Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Android apps request additinal permissions at runtime?

I'm working on an app which contains some scripting support. The scripts executed by this app might require all sorts of permissions in the future, but it's difficult to predict which ones.

Is there a way to request additional permissions at runtime (like iPhone apps sometimes do) instead of specifying them all in advance in AndroidManifest.xml?

like image 672
Aleksander Kmetec Avatar asked Feb 01 '10 10:02

Aleksander Kmetec


People also ask

What are Android runtime permissions?

Runtime permissions prevent apps from gaining access to private data without a user's consent, and provide them with additional context and visibility into the types of permissions that applications are either seeking, or have been granted.

Why do apps always ask for so many permissions?

Apps require access to different components and data on our Android devices to work as intended, and in most cases, we have to grant them permission to do so. In theory, Android app permissions are a great way to ensure our safety and protect our privacy.

How does Android handle multiple permissions?

Just include all 4 permissions in the ActivityCompat. requestPermissions(...) call and Android will automatically page them together like you mentioned. I have a helper method to check multiple permissions and see if any of them are not granted.


1 Answers

According to the Android documentation:

The permissions required by an application are declared statically in that application, so they can be known up-front at install time and will not change after that.

like image 132
JRL Avatar answered Sep 20 '22 06:09

JRL