Set permissions for app at runtime

0

There are some app's that when we open it for the first time it asks the user permission to activate certain features of the device, such as camera, contacts, etc. ...

How do I get the permission to be requested when it is opened instead of when the installation is done?

    
asked by anonymous 17.11.2017 / 17:52

2 answers

0

For versions of Android 6 or higher, dangerous permissions are required at run time, so it's important to know that.

Permissions such as internet access and Wi-Fi configuration are not considered dangerous, but access to camera, data etc. are considered. Android does not allow the app to have access to functionality with the old permission type, ie, ask in install does not work on Android equal to or greater than version 6.

    
17.11.2017 / 17:56
0

You can use Cordova's cordova-diagnostic-plugin plugin for diagnosing and requesting permission.

Here you can find an example usage.

    
17.11.2017 / 20:00