Where To Enter Capacitor Permissions For Android
-
My app is now getting a pop-up on Android when a user installs that it didn’t get before. It’s a permission request from the user for: Location, Photos/Media/Files, Camera, and Microphone. The problem is that my app really doesn’t require all of these permissions. It doesn’t use the camera or microphone at all. Location isn’t tracked in any way. And the only way I can think of Photos/Media/Files being involved is that the app plays mp3 and video files downloaded from the web.
How can I turn off the permissions for the unneeded features in Android devices?
And how can I determine whether I need to have the user approve Photos/Media/Files permission?
-
To get better answers, you should really ask these questions to the Capacitor community.
-
@dobbel Correct me if I’m wrong, but doesn’t Quasar handle the entry of settings differently from the way Capacitor itself normally does? That was my impression.
-
I am more of a Cordova guy here.
In Quasar you can set some settings like package name, back button behavior. For the most part you’ll have do the specific config(install plugins, set permissions explanations for IOS) directly in the generated cordova/capacitor project folders. Quasar only controls the www folder of an Cordova project ( and probably Capacitor).
See here for the Capacitor specific doc:
https://quasar.dev/quasar-cli/developing-capacitor-apps/configuring-capacitor#capacitor.config.json -
I can see in src-capacitor > android > app > src > main > AndroidManifest.xml that the permissions were set there automatically after I built the app.
I guess I have to assume that is the default location, although it seems strange to me given that this file was automatically built after I ran the build command.
I would have thought there was a setting in quasar.conf.js or in package.json or something like that.
-
AndroidManifest.xml
That seems the place to do the permissions in Capacitor see:
https://capacitorjs.com/docs/android/configuration