breautek commented on issue #900:
URL:
https://github.com/apache/cordova-plugin-camera/issues/900#issuecomment-2447617805
> I have just tested and still have the same issue. I will try to see if I
can find anything in logcat, but not quite sure what to look for.
I'd suggest filtering logcat by your application id. Android Studio will do
this by default if you run the project via Android Studio. (Do not do any
AGP/Android Gradle Plugin upgrades when you open the project in Android
Studio). The Android Studio project can be found at /platforms/android
Then you can dump the logcat as a text file here and when I find a chance I
can look over it.
> I have noticed that the app has not requested access to (listed with
access to) Camera in the device settings.
CAMERA permission is not normally required unless if you're using the camera
APIs directly, which this plugin does not. It delegates to the camera
application installed on the device.
Normally the camera application contains the CAMERA permission so that they
can operate the camera and send the result back to the requesting app. However
there have been reports of camera applications not handling this correctly, and
will not work unless if the application itself has the CAMERA permission. Which
I'm beginning to think your case is this.
A workaround might be to declare the CAMERA permission at the app level.
So you can try adding the following in your `config.xml`:
```xml
...
<platform name="android">
<config-file target="AndroidManifest.xml" parent="/*"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.CAMERA" />
</config-file>
</platform>
```
The plugin does check if the `CAMERA` permission is declared and will
request the permission if not granted. It's considered privacy sensitive so the
`CAMERA` permission isn't declared automatically especially when it's normally
not required. If this does solve your issue, it indicates a problem within the
camera app itself.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]