WuglyakBolgoink edited a comment on issue #763:
URL: 
https://github.com/apache/cordova-plugin-camera/issues/763#issuecomment-959155793


   Hallo @beard7 
   
   
   > @WuglyakBolgoink How/where are you adding that? My AndroidManifest.xml 
already includes `<uses-permission android:name="android.permission.CAMERA" 
/>`, but I've still got this issue on my GP3.
   
   
   1. install 
       > `"cordova-custom-config": "5.1.0"`
   2. check your config
   3. add custom config for CAMERA permission, because original cordova 
"edit-config" remove the first permission from manifest file!!!
   4. remove your platform folder
   5. generate platform folder again
   ----
    
   ```xml
   <widget ...>
       ...
       <preference name="cordova-custom-config-autorestore" value="false" />
       <preference name="cordova-custom-config-stoponerror" value="true" />
   
       ...
       
       <platform name="android">
           <preference name="AndroidLaunchMode" value="singleTask" />
   
           <preference name="android-minSdkVersion" value="22" />
           <preference name="android-maxSdkVersion" value="31" />
           <preference name="android-targetSdkVersion" value="30" />
   
           <preference name="AndroidXEnabled" value="true" />
         
           <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" 
target="/manifest/application/activity[@android:name='MainActivity']">
               <activity xmlns:tools="http://schemas.android.com/tools"; />
           </edit-config>
   
           <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" 
target="/manifest/application/activity[@android:name='MainActivity']">
               <activity android:requestLegacyExternalStorage="true" />
           </edit-config>
   
           <custom-config-file parent="./" target="AndroidManifest.xml">
               <uses-permission android:name="android.permission.CAMERA" />
           </custom-config-file>
       </platform>
   
       ...
   
   </widget>
   ```
   
   After that we can use camera on GP3 again...


-- 
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]

Reply via email to