-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
Migrate image picker to new Photo Picker (Android 13 compatibility) #499
base: master
Are you sure you want to change the base?
Conversation
With Android 13 the previous photo picker didn't trigger at all anymore. But we can use the new Photo Picker UI as described in [0] to get a new and better photo picker. Some refactoring is necessary to suport that. [0] https://android-developers.googleblog.com/2023/04/photo-picker-everywhere.html
Any updates on this? Being unable to select files from storage kinda breaks the whole app for Android 13 users. |
Thanks & sorry for the late review. |
It does increase minsdk? At least in git diff there's no change in manifest or is this through some other reason? |
I have been using the app compiled from this branch and it seems to work just fine |
Right, minSdk is currently 14, and PickVisualMedia is 19+. But not sure anyone really is still using an Android version lower than 4.4 KitKat, but I get what you mean. |
Currently sdk level 19 support is at 99.8% of the devices, and Google Play services dropped support for API levels below 21 in August 2023 according to https://apilevels.com/. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the huge latency in processing it.
I gave it more testing and looks good to me - would really love to have this as part of the next release.
The only problem currently is that the tests are not passing anymore as the intents are different - if this problem is solved this will be merged.
I looked around a bit but I don't see an obvious way to test the new onclick behavior. Also not super familiar with the photo picker, even less since it's been more than a year since I made this PR 😅 Would it be okay to drop these 3 tests? |
With Android 13 the previous photo picker didn't trigger at all anymore. But we can use the new Photo Picker UI as described in [0] to get a new and better photo picker. Some refactoring is necessary to suport that.
[0] https://android-developers.googleblog.com/2023/04/photo-picker-everywhere.html
Fixes #477
NOTE: I haven't tested this extensively, just a bit on an Android 13 virtual device in Android Studio but everything seems to work there. Before merging (or basing something on this) please test this also on older devices, I don't know how much is available there of this photo picker. Maybe it needs some runtime if.
It's also been a while since I properly did some development for Android so some code could be a bit weird.