Android Question Permission type (Only when App is running, Always)

Pedro Caldeira

Active Member
Licensed User
Longtime User
Hello All,
Is there any way for me to check what kind of permission the user gave to the APP ?
Not only if granted or revoked, but if granted, if it is always granted or only when the app is running, etc.

Thanks in advance

Regards,
Pedro Caldeira
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
only when the app is running
This is only(?) relevant for the location - ACCESS_BACKGROUND_LOCATION permission.

You can check for a permission with RuntimePermissions.Check.

Example that uses this permission: https://www.b4x.com/android/forum/threads/background-location-tracking.99873/#content
Note that in the example the permission is only needed because the location tracking is started automatically after boot. It isn't needed if the app is running and the moves to the background with a foreground service.
 
Upvote 0
Top