Prevent the location permission prompt at app start time

I am using the Ionic 5 and Capacitor 3. I have added the permissions in the AndroidMenifest for the location.

After installing the app just open the app, location prompt shows. I don’t want it at the app start time. Can I stop it?


Capacitor doesn’t request any permission unless you added code to request the permission or added code that requires the permission to work. So if it’s not you, then some script is trying to get the location without your knowledge.

Thanks, @jcesarmobile, Actually you did not get my point. I am explaining again.

I have added the permissions in the AndroidMenifest.xml file.
When I install the app then open the App for the first time it shows the Location Permission Prompt. it should show when I will request to on the location.


I get your point perfectly, maybe you didn’t get mine.
Adding the permission to the manifest doesn’t request the permission.
There is some code requesting it, if it’s not you then it’s some script without you knowledge, but not capacitor, capacitor only request the permission when your app call the code to request the permission or call the code to get the location.

Thanks @jcesarmobile , I got your point.

Let me create a new project and test it. I will let you know.


@jcesarmobile Thank You Very Much!
I have created a new project and added the permissions in the AndroidMenifest file.
Installed the Apk, got that it was not showing the Location Permission Propmp at the beginning.

I have started reviewing the code the go that a script was calling the location.