ilan Expert Licensed User Longtime User Jun 26, 2016 #1 hi i would like to request all dangerous permissions on activity start. some actions (like phonestate) are called via service that is running in the background and i dont want to ask there to allow a permission. is it possible to ask for all dangerous permissions an app start? do i have to store the user choice (allow|not allowed) or does the lib store it automatically somewhere? thanx
hi i would like to request all dangerous permissions on activity start. some actions (like phonestate) are called via service that is running in the background and i dont want to ask there to allow a permission. is it possible to ask for all dangerous permissions an app start? do i have to store the user choice (allow|not allowed) or does the lib store it automatically somewhere? thanx
Erel B4X founder Staff member Licensed User Longtime User Jun 27, 2016 #2 You cannot call RuntimePermissions.CheckAndRequest from a service as it is not possible to show any UI from a service. You can request all permissions from the main activity. ilan said: do i have to store the user choice (allow|not allowed) or does the lib store it automatically somewhere? Click to expand... No. This is managed by the OS. If the user has already grant the relevant permission then the PermissionResult will be raised immediately. Upvote 0
You cannot call RuntimePermissions.CheckAndRequest from a service as it is not possible to show any UI from a service. You can request all permissions from the main activity. ilan said: do i have to store the user choice (allow|not allowed) or does the lib store it automatically somewhere? Click to expand... No. This is managed by the OS. If the user has already grant the relevant permission then the PermissionResult will be raised immediately.