Closed munsterlander closed 6 years ago
Did you (as documented) include the necessary <uses-permission>
keys in the AndroidManifest.xml
? In the case of requestCameraAuthorization(), the relevant keys would be CAMERA
and READ_EXTERNAL_STORAGE
.
Also see the various example project for a working illustration of how to use this plugin.
Yes. I am using Monaca to build and per their documentation, they use this format:
<preference name="android-manifest/uses-permission/[@android:name='android.permission.CAMERA']/@android:name" delete="true" />
<preference name="android-manifest/uses-permission/[@android:name='android.permission.READ_EXTERNAL_STORAGE']/@android:name" delete="true" />
I get the prompt, I click allow and then denied.
Edit: So clearly something is going on during my build, because the example APK works fine. I will go back to Monaca to figure out what is happening with their config.
Edit2: So decompiling the APK shows the camera permission is not getting added which is resulting in the failure. Thanks for linking to the example app. This is closed.
So, the following code appears to work in that I get the popup but when I tap Allow, I get the DENIED_ALWAYS response. I have tried using the tryAnotherWay() function instead of the firstTry() function, but it fails as well. This is on Cordova 6.5.0 and Cordova-Android 6.2.3. I want to just use one function, but I have been trying all available functions to see what will work. Am I missing something?