Skip to content
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

Support AndroidX #15

Closed
HarelM opened this issue Apr 24, 2021 · 7 comments
Closed

Support AndroidX #15

HarelM opened this issue Apr 24, 2021 · 7 comments
Labels
android Related to the Android platform enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@HarelM
Copy link
Collaborator

HarelM commented Apr 24, 2021

Feature Request

Seems that most updated plugins support AndroidX.
As far as I understand this is a breaking change in terms of the plugin (meaning you either support the old way or the new way) so I would avoid this change in a minor release.
I'm still not sure what needs to be done in order to support this and what's the status of the other community plugins. If most modern plugins already support this then it should be a high priority for next major release, but if not then it can wait.
I currently don't use AndroidX in my project since I think not all the plugins support this, but I need to check...

@RaddishIoW RaddishIoW added enhancement New feature or request help wanted Extra attention is needed labels Apr 24, 2021
@RaddishIoW RaddishIoW added this to the 2.0 milestone Apr 27, 2021
@RaddishIoW RaddishIoW added the android Related to the Android platform label May 3, 2021
@RaddishIoW
Copy link

Cordova have released Android 10.0.0, which requires AndroidX support.
https://cordova.apache.org/announcements/2021/07/20/cordova-android-10.0.0.html

They cite the cordova-plugin-androidx-adapter as a way of migrating for projects still using the old support libs.

@RaddishIoW
Copy link

  • Investigate what is needed to migrate to AndroidX support

@HarelM
Copy link
Collaborator Author

HarelM commented Jul 28, 2021

@RaddishIoW Let me know if you want me to help, I'm working extensively on MapLibre-gl these days but if you need me to look at something or help out let me know.
I know that the following plugin had made the change from android to androidX:
https://github.com/darryncampbell/darryncampbell-cordova-plugin-intent#readme
These are the relevant commits, I think:
darryncampbell/darryncampbell-cordova-plugin-intent@ef58440
darryncampbell/darryncampbell-cordova-plugin-intent@567c0f8
darryncampbell/darryncampbell-cordova-plugin-intent@61ed2ca

The first one might not be needed in case cordova-android is defaulting to androidX, maybe, not sure...
Good luck!

@HarelM
Copy link
Collaborator Author

HarelM commented Sep 27, 2021

@RaddishIoW did you get around to doing this?
I'm trying to migrate now to cordova-android@10 and this is the main plugin that fails compilation.
Everything I tried that did not require to change the code here does not seem to work.
Let me know what's the status of this.
As a side not, it might be better to move the files a bit in order to have all the files under the same namespace. currently when the build fails it's unclear that the files belong to this plugin as they are scattered around in all kind of namespace.
Not entirely related to this issue though...

HarelM added a commit that referenced this issue Sep 27, 2021
@HarelM
Copy link
Collaborator Author

HarelM commented Sep 27, 2021

Opening the android folder in android studio and clicking refactor migrate to androidX seems to do most of the heavy lifting.
I've created a branch called androidX to allow testing this and fixing what needs to be fixed.
I'll report back here after I successfully manage to migrate my project to androidX.

HarelM added a commit that referenced this issue Oct 1, 2021
* Set theme jekyll-theme-hacker

* Update Changelog

* docs: move to github pages (#35)

Fixes #32

* Update Changelog

* Adds promises and subscription (#36)

Resolves #16 

* Add promises and subscription to js interface #16 - initial commit

* #16 - fix subscriable interface

* bump version, fix docs

* fix incorrect link

* Update Changelog

* Support AndroidX #15 - main commit

* Bump version, update readme.

Co-authored-by: Adam Radestock <[email protected]>
Co-authored-by: RaddishIoW <[email protected]>
Co-authored-by: HarelM <[email protected]>
@RaddishIoW
Copy link

Hi @HarelM, sorry for the late reply - I've been snowed-under in other things for a few weeks, and just haven't had the bandwidth to even look at GitHub.
Glad you managed to get this sorted! I'll update when I get a chance and check it with my app.

This wasn't a major issue for me, as I was using a cordova plugin to convert to AndroidX on-the-fly...

So I think we can close this issue now, yeah?

@HarelM
Copy link
Collaborator Author

HarelM commented Oct 2, 2021

This plugin didn't work for me, I'm not sure why, but it was a good incentive :-)
Yes, closing...

@HarelM HarelM closed this as completed Oct 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Related to the Android platform enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants