You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/01/31 15:07:27 UTC

[GitHub] ankitjainOfficial opened a new issue #419: No camera permission in Android app.

ankitjainOfficial opened a new issue #419: No camera permission in Android app.
URL: https://github.com/apache/cordova-plugin-camera/issues/419
 
 
   In my app, I use https://github.com/dpa99c/cordova-diagnostic-plugin for checking permissions before invoking camera.getPictures method. When I'm trying to check for camera permission, it is sending me to the app settings page, to enable camera. But, it does not show camera in the list of permissions. 
   
   On digging a little deeper, I find that the AndroidManifest.xml does not have the <uses-permission> for `android.permission.CAMERA`. 
   
   Can anybody please let me know, what is the best way to get that permission applied, or if I'm attempting to do something incorrect.
   
   `ionic info`
   
   ```
   Ionic:
   
      ionic (Ionic CLI)  : 4.5.0 (/Users/ankit/.nvm/versions/node/v7.10.0/lib/node_modules/ionic)
      Ionic Framework    : ionic-angular 3.9.2
      @ionic/app-scripts : 3.2.1
   
   Cordova:
   
      cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
      Cordova Platforms     : android 7.1.4, ios 4.5.4
      Cordova Plugins       : cordova-plugin-ionic-webview 3.1.1, (and 26 other plugins)
   
   System:
   
      Android SDK Tools : 26.1.1 (/users/ankit/dev-tools/android-sdk-macosx)
      ios-deploy        : 1.9.2
      ios-sim           : 6.1.2
      NodeJS            : v7.10.0 (/Users/ankit/.nvm/versions/node/v7.10.0/bin/node)
      npm               : 5.4.2
      OS                : macOS Mojave
      Xcode             : Xcode 10.1 Build version 10B61
   ```
   
   `cordova plugins`
   
   ```
   branch-cordova-sdk 3.1.5 "branch-cordova-sdk"
   call-number 0.0.2 "Cordova Call Number Plugin"
   cordova-clipboard 1.2.1 "Clipboard"
   cordova-custom-config 5.0.3 "cordova-custom-config"
   cordova-plugin-actionsheet 2.3.3 "ActionSheet"
   cordova-plugin-apprate 1.4.0 "AppRate"
   cordova-plugin-camera 4.0.3 "Camera"
   cordova-plugin-compat 1.2.0 "Compat"
   cordova-plugin-crop 0.1.0 "CropPlugin"
   cordova-plugin-device 1.1.7 "Device"
   cordova-plugin-dialogs 2.0.1 "Notification"
   cordova-plugin-email-composer 0.8.15 "EmailComposer"
   cordova-plugin-file 5.0.0 "File"
   cordova-plugin-file-transfer 1.7.1 "File Transfer"
   cordova-plugin-geolocation 2.4.3 "Geolocation"
   cordova-plugin-globalization 1.11.0 "Globalization"
   cordova-plugin-googlemaps 2.5.0 "cordova-plugin-googlemaps"
   cordova-plugin-inappbrowser 1.7.2 "InAppBrowser"
   cordova-plugin-ionic-webview 3.1.1 "cordova-plugin-ionic-webview"
   cordova-plugin-nativestorage 2.3.2 "NativeStorage"
   cordova-plugin-safariviewcontroller 1.5.4 "SafariViewController"
   cordova-plugin-screen-orientation 3.0.1 "Screen Orientation"
   cordova-plugin-splashscreen 4.1.0 "Splashscreen"
   cordova-plugin-statusbar 2.4.2 "StatusBar"
   cordova-plugin-whitelist 1.3.3 "Whitelist"
   cordova-plugin-x-socialsharing 5.4.4 "SocialSharing"
   cordova-sms-plugin 0.1.13 "Cordova SMS Plugin"
   cordova.plugins.diagnostic 4.0.10 "Diagnostic"
   es6-promise-plugin 4.2.2 "Promise"
   ionic-plugin-keyboard 2.2.1 "Keyboard"
   uk.co.workingedge.phonegap.plugin.launchnavigator 4.2.2 "Launch Navigator"
   ```
   
   
   I tried adding this code from SO, but the build fails, with AAPT2 error.
   ```
           <config-file mode="merge" parent="/*" target="AndroidManifest.xml">
               <uses-permission android:name="android.permission.CAMERA" />
               <uses-feature android:name="android.hardware.camera" />
               <uses-feature android:name="android.hardware.camera.autofocus" />
           </config-file>
   ```
   
   Let me know, if any detailed info is required. Thanks.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org