I’ve got an app which I managed to deploy to Android and iOS. The app allows the user to submit a photo or take a picture. This works fine on iOS. On Android, the ‘browse’ dialogue for selecting an image does nothing. No error message is shown, nothing happens.
How to resolve this? How to troubleshoot this?
I’m targeting Android SDK 29, but soon have to switch to SDK 30.
The diagnostic is the one used to ask user for permission.
These works for us with target SDK 29 but NOT with 30 as there seems to have been a big change in Android permissions with SDK 30.
We’ve read somewhere that it’s related to cordova that has not updated yet to support the camera permissions of SDK 30.
We’re getting worried that we won’t get it in time for Google Play Store’s deadline in august for submitting SDK 29 apps.
I installed this plugin. My app compiled, but when trying to run it on an iOS device, I got console errors I had not seen before:
2021-07-07 11:26:51.608777-0300 {{my app}}[32039:13047307] [DYGLInitPlatform] connection to host has failed: Error Domain=NSPOSIXErrorDomain Code=2 “No such file or directory”
I first installed cordova:cordova-plugin-camera. My app compiled, and ran in the browser. But, the camera does not work, here. Though this seems to be the norm.
I also installed this diagnostics plugin:
Could it be that is not the one you are referring to?
Running my app via Xcode on my iOS device, the app ran, but I do not seem to be able to trigger the camera.
The following seems to work:
document.addEventListener("deviceready", onCDeviceReady, false);
function onCDeviceReady() {
console.log(navigator.camera);
}