Hi All,
Im using Cordova Camera Plugin and I've got the following behaviors on Android 13:
When selecting pictures from the Gallery the gallery doesnt show and it returns error message 20.
When taking a picture, the camera doesnt open and nothing happens, it doesnt return any error.
Using an older version of Android (v. 10) everything works as expected.
Also I've managed to check the Android Manifest XML and I've got the following permissions:
For API Starting at Level 33 (Android Manifest Permissions)
In the Device the application has all ther permissions to access Camera / Photos and Videos / Microphone / Music and Audio
Thank you for your help!
João Henriques
So, after some research here are my conclusions:
We've got here the Android Versions and the Cordova Android API Level Support.
This can cause some confusion because as we can see the Android 13 has an API Leve 33 and the Cordova API Level Suppport goes up to Level 32, so we wonder if there's a update still to be release on the Cordova side.
In most of the post's that I've readed released regarding this error, the cause was permissions that have dissapeared from the Android Manifest file.
Has I mentioned on the post the application Manifest file have the permissions for both API Level < 32 and API Level 33.
On the application in the Extensibility Configurations:
- Originally we were targetting the cordova-plugin-camera#4.2.0-OS34, then we removed the version to target to the latest version of the Cordova Camera Plugin.
The issue was still persisting.
Then today, I created a new phone application with the Camera Plugin in my personal environment to check if the issue was still reproducible, and it was not.
Checked the code, to see if there any changes that needed to be implemented and no changes were needed.
Then I verified the Camera Plugin (clone) Extensibility Configurations and there it was:
"plugin":{
"url":"https://github.com/OutSystems/cordova-plugin-camera#4.2.0-OS40"
}
Note that in the releases on the Outsystems Cordova Plugin the latest version is 4.2.0-OS39 and in the Outsystems Forge Component the configuration targets to the 4.2.0-OS40.
After changing the target version, I was able to get Photos and access to the Phone Gallery in Android 13 and Android 10.Hooraayyy!
Thank you!