Starting in Android 6.0 (API level 23), Google introduced a new permissions model in which apps are required to request permissions from the user at runtime, rather than when the app is installed. This means that when an app needs to access a protected resource or data on the device, it must display a dialog to the user asking for their permission to do so. The user can then grant or deny the permission as they see fit.
The good thing about using this extension for requesting and checking Android permissions is the ease of use and because you can use the data returned in the Async Event to take actions or run scripts after a specific permission has been allowed/denied.
Using this simple to use extension you can check and request any permitted permission for the app. Note permission requests can only be denied twice after this the request dialog will not show and users have to manually set the permission on their device.
The extension has 3 functions: Android_CheckPermission(PERMISSION [string],Return async data [Boolean]) Android_RequestPermission(PERMISSION [string]); Android_hasExternalSDCard() - This is useful when requesting for Write External Storage permission, as some phones dont have expansion slots for sd cards, so you wouldnt need to request the permission at runtime.
Async Social Event: Android_RequestPermission(PERMISSION) will return: type [STRING] - "android-permission" permission [STRING] - the full permission such as "android.permission.POST_NOTIFICATIONS" allowed [INT] - 0 for user denied, 1 for user allowed and -1 for error
In 1.3 update+ You can use the new function Android_Permissions_Check(PERMISSION) to check for permissions and request them if needed. You can use the data returned in the Async Event by Android_CheckPermission() to set permission got variable if its already been set....
See the Project for usage help...
End User Licence Agreement (EULA).
improved code, new convenient script, New function to check if external storage exists