-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AndroidX support #83
Comments
Migrating to AndroidX will be in the next major release. I can't give you an exact release date, but I will try and start looking into the changes maybe next week. This would be mostly researching to outline some changes I want to land in version 3 other than just Android X. For example, upgrading the FCM default version. I also just released version 2.0.0 that resolved the iOS and npm restore related issues.
This PR needs to be fixed before being ever be approved or merged. The scope of this PR itself is too excessive. It has too many changes and focuses on many tasks. It should be updated to focus on one task. With that PR, it needs to
AndroidX SupportHave you tried the following steps to see if this works for supporting AndroidX right now?
<preference name="AndroidXEnabled" value="true" />
I can build successfully with the above setup but have not tested in-depth. The "cordova-plugin-androidx-adapter" is used to help get Android X working for plugins that haven't migrated yet. Also, in my test, it still uses the default FCM version 18.+. |
I'm not sure how you're getting a build, perhaps you can document all your settings. My builds fail consistently. With preference:
And plugins:
Using CLI 10.0 I can not get a successful build. I get the following errors:
This is with both the 1.0 and 2.0 versions of the plugin and with and without jetifier enabled. |
Here is also a build command output
|
Thanks! That helped a lot! |
Hi. I updated cordova to 10.0.0 and cordova-android to 9.0.0 in order to use other plugins and I left phonegap-plugin-push for cordova-plugin-push. I didn't change the code as it seems to be the same on the documentation, and I made sure to add androidx's support. However, when I send a push notification from the server (using the registrationId, with success), there is no reaction on the phone. No notification, no vibration, nothing (I tested in background and in killed modes). I checked the logs and here's what I managed to fetch :
I checked the permissions and my app has the permission to display notifications. It was working well with phonegap-plugin-push on cordova-android 8 and cordova 8. |
Please make a new post and make sure you've created created channels in your in your app or android won't play sounds. |
Aren't channels only for Android 8 and more ? My phone is on Android 6. |
Ok. I found the reason. Stupid me had installed cordova-plugin-firebasex which was taking cordova-plugin-push's job but couldn't do it right (he can't find the pushed notification's data properly). I discovered something interesting on the way, I'll make a new issue about that. |
I will close this ticket as the AndroidX support PR was created and merged into master. |
to be consistent with havesource/cordova-plugin-push#83 (comment) This seems to fix the error in e-mission/e-mission-docs#680 (comment)
Hi,
first of all, thank you for maintaining the push plugin!
I was wondering, what are your plans on migrating this project from deprecated Android Support Library to AndroidX? I saw your message here #18 (comment) that you wanted to stay with the deprecated dependency for a while, since it's hard to use both the old and new one. However, many cordova plugins already migrated to the new one, which causes the dependency conflicts if they are used with the Cordova Push Plugin. To fix the issue people have to either stay with older versions of plugins or create a new fork of the Cordova Push Plugin with the AndroidX support, which is troublesome in a long term.
There's also this pull request awaiting #66
Therefore I'd like to ask what are the plans regarding the AndroidX support, when can we expect it?
The text was updated successfully, but these errors were encountered: