Android Manifest not adding uses-permissions from plugins

My android app is unable to enable Camera Permissions. In the app I request permission with the native Diagnostic Plugin, it returns “DENIE_ALWAYS”. When I go to the app settings, it says the app doesn’t require any permissions. This is where I found my AndroidManifest.xml doesn’t include any uses-permission tags other than INTERNET. Shouldn’t it be pulling these permissions directly from my plugins? I can’t figure out how to tell the app that it needs permission. (I have several, but lets use CAMERA for this example)

Here is my current ionic info.

Ionic:

   ionic (Ionic CLI)             : 4.12.0)
   Ionic Framework               : @ionic/angular 4.1.2
   @angular-devkit/build-angular : 0.13.7
   @angular-devkit/schematics    : 7.3.7
   @angular/cli                  : 7.3.7
   @ionic/angular-toolkit        : 1.2.3

Cordova:

   cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms     : android 7.1.4, ios 4.5.5
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.4.1, (and 20 other plugins)

System:

   ios-deploy : 1.9.4
   NodeJS     : v10.15.1
   npm        : 6.9.0
   OS         : macOS Mojave
   Xcode      : Xcode 10.1 Build version 10B61

Any help would be appreciated.

1 Like

Something very similar is happening to me too.
I have an app in ionic 3 that worked perfectly, but since I updated ionic to 4.12.0 when using build, the changes in AndroidManifest.xml generated by the plugins, are no longer in the AndroidManifex.xml …

Ionic:

ionic (Ionic CLI) : 4.11.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.4
@ionic/app-scripts : 3.2.3

Cordova:

cordova (Cordova CLI) : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.0.0
Cordova Plugins : cordova-plugin-ionic 5.2.1, cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.0.1, (and 15 other plugins)

System:

Android SDK Tools : 26.1.1 (/Users/fortes/Library/Android/sdk/)
ios-deploy : 1.9.2
ios-sim : 5.0.8
NodeJS : v10.5.0 (/usr/local/bin/node)
npm : 6.9.0
OS : macOS Mojave
Xcode : Xcode 10.2.1 Build version 10E1001

This ended up solving my issue.

Which one is the correct path?

android>app>src>main>AndroidManifest.xml
or
platforms>android>AndroidManifest.xml

mine is located on the first path and it’s not updating the permissions.

Even for me, AndroidManifest.xml file is located at android>app>src>main>AndroidManifest.xml

1 Like