-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(android)!: Android 13 support #844
Conversation
254250d
to
20ca6b9
Compare
Replace READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE permissions with READ_MEDIA_IMAGES on SDK 33
Handle video permission Add permissions to manifest
Only require media storage permissions when taking picture when save to album is requested
Final fixes
20ca6b9
to
609f5a0
Compare
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.
untested, but code-wise lgtm
I believe this would be something you fix within your project.
If you are using a plugin that depends on If it is not, check if there is a new plugin version that hopefully supports Note: Some Cordova core plugins depend on the file plugin and not updated, but it is in the process of being updated. If you are adding the |
That is exactly how I fixed it 😄 and seeing the original PR already mentioning this issue I removed the question. |
On an Android 8.0 (and 7.1.1) device it fails after it asks for permission the first time with the following error
If I then choose to pick a picture using using I am calling
It appears to be because of this line in the plugin; on my phone the content store is aparently on the external storage.
It appears the I worked around/fixed it by changing
to
Seeing as even when not saving the image you still need storage permission to process duplicates. |
@christiaan I updated the PR to fix the Android 8.0 and lower issue you reported. Can you confirm if it resolved for you? |
@erisu I can confirm the last commit resolved the issue on Android 8.0 (Samsung A3 2017) 👍 thanks! |
Just an update, I tested this PR against my app and it seems good to go, at least in my usage of the camera plugin. |
Thank you, now camera working on android 13 |
* feat(android)!: Android 13 support * refactor(android): simplify getPermissions logic * feat(android)!: bump cordova-android requirement to >=12.0.0 * feat(android): update saveAlbumPermission to include Android 9 and below use case --------- Co-authored-by: ochakov <[email protected]> # Conflicts: # package-lock.json # package.json # plugin.xml # src/android/CameraLauncher.java
* feat(android)!: Android 13 support * refactor(android): simplify getPermissions logic * feat(android)!: bump cordova-android requirement to >=12.0.0 * feat(android): update saveAlbumPermission to include Android 9 and below use case --------- Co-authored-by: ochakov <[email protected]> # Conflicts: # package-lock.json # package.json # plugin.xml # src/android/CameraLauncher.java
* feat(android)!: Android 13 support * refactor(android): simplify getPermissions logic * feat(android)!: bump cordova-android requirement to >=12.0.0 * feat(android): update saveAlbumPermission to include Android 9 and below use case --------- Co-authored-by: ochakov <[email protected]> # Conflicts: # package-lock.json # package.json # plugin.xml # src/android/CameraLauncher.java
Platforms affected
android
Motivation and Context
Android 13 Support
Description
getPermissions
method.closes #814
resolves #825
Testing
Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)