Wish Native support of the new runtime permissions

Status
Not open for further replies.

corwin42

Expert
Licensed User
Longtime User
The most important feature of Android 6.0 Marshmallow (API 23) for us developers will be the new permissions framework.

What's so special with it is that if you want to use targetSdkVersion=23 in the manifest the app MUST use the new permissions model if it needs a permission. I think this will get an elementary feature and it should be supported by B4A directly.

I have played around with it and have a solution with a library and some inline Java code more or less running. It is not very hard to implement and it should be possible to implement it in a backwards compatible way so that all this new stuff won't be called in API 22 and below. Only limitation will be that you will have to reference the android.jar version 23 or above.

The steps are as follows:

- Check, if the app already have the permission granted. If yes, just go on normal with the program.
- If not, check, if the app should display an explanation why this permission is needed. After that request the permission.
- An event (on activity level) is fired when the permission is granted or rejected by the user.

It is all explained in the official documentation here.

Discussion welcome.
 

DonManfred

Expert
Licensed User
Longtime User
+1
 

Marco Nissen

Active Member
Licensed User
Longtime User
yes, found out too... but: if I add it, I get this error immediately -- any idea why?

Error parsing metadata file: .....\AppData\Local\Android\android-sdk\tools\..\extras\android\m2repository\com\android\support\support-v4\maven-metadata.xml
 
Status
Not open for further replies.
Top