Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Platforms affected
android
Motivation and Context
Added support for android 13 (API level 33). Note that this mi-corporation version of the Apache plugin is based on version 2.4.1 of the Apache cordova-plugin-camera plugin. I applied the changes necessary to support android 13 in order to support modern android apps.
Description
For reference I looked at PR apache#844 in the apache cordova-plugin-camera repository:
apache#844
I applied the same changes, namely requesting the permission READ_MEDIA_IMAGES in place of READ_EXTERNAL_DATA. This requirement is documented here:
https://developer.android.com/about/versions/13/behavior-changes-13
Testing
I placed an updated copy of the corodva-plugin-camera source code on my local file system and updated my config.xml and package.json files to pull cordova-plugin-camera from this local folder rather than from a repote repository.
I built the main cordova app (Ideagen Smartforms) using our android build process, and installed the resulting .apk file into an Android Emulator running version android 13 (API level 33).
I tested Smartforms and confirmed from the Image Annotation field I could load images from the local photo gallery and also take pictures from the camera.