B4A Library PermissionsManager

cheveguerra

Member
Licensed User
Longtime User
Hi everybody,

When using B4XPages it is necessary to change:

Activity_PermissionResult
to
B4XPage_PermissionResult

Is this also necessary when using this library??

Best regards
 

Ivica Golubovic

Active Member
Licensed User
Hi everybody,

When using B4XPages it is necessary to change:

Activity_PermissionResult
to
B4XPage_PermissionResult

Is this also necessary when using this library??

Best regards
For activity project you must use Activity_PermissionResult.
For B4XPages project it is recommended to use B4XPage_PermissionResult (it is delegatet from MainActivity by default).
 

cheveguerra

Member
Licensed User
Longtime User
For activity project you must use Activity_PermissionResult.
For B4XPages project it is recommended to use B4XPage_PermissionResult (it is delegatet from MainActivity by default).
So, if I DON'T use B4XPage_PermissionResult it "should" work anyway?? .. I have had situations when if I use "Activity_PermissionResult" on a B4XPage Project, the permission is not granted, and everything after that line does not execute!

Best regards
 

Ivica Golubovic

Active Member
Licensed User
Just use next lines in your active B4XPage:
Code:
Dim PM As PermissionsManager
PM.CheckAndRequestPermission(PermissionsManager.[your desired permission])
Wait For B4XPage_PermissionResult (Permission As String, Result As Boolean)
If Result Then
    'Allowed
End If
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…