Android Question [B4XPages] Wait For B4XPage_PermissionResult not receiving result back.

Enrico Fuoti

Active Member
Licensed User
Longtime User
Hello all,
I have a problem with runtime permissions in B4XPages app.
When executing the following command,
B4X:
        'PERMISSION_ACCESS_FINE_LOCATION -------------------------------------
        rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
        Wait For B4XPage_PermissionResult (Permission As String, Result As Boolean)
        ''This code is never reached ------
        Log("PERMISSION_ACCESS_FINE_LOCATION " & Result)
        If Result = False Then
            MsgboxAsync("Geolocation not allowed!", "Alert...")   
        End If
code jumps to the sub
B4X:
Sub Activity_PermissionResult (Permission As String, Result As Boolean)
    B4XPages.Delegate.Activity_PermissionResult(Permission, Result)
End Sub

but it never returns back.
Any suggestion?
 

Enrico Fuoti

Active Member
Licensed User
Longtime User
Grazie Luca,
I moved the code in B4xMainpage, but result is the same.
I must say that the "B4XPages.Delegate.Activity_PermissionResult(Permission, Result)" instruction
resides in activity2 module as I have integrated a splash screen following Erel's sample. I'm not sure if this may have something to do with this behaviour.
 
Upvote 0

Enrico Fuoti

Active Member
Licensed User
Longtime User
Thank you Luca,
unfortunately neither of the two options work.
Still there is no return from B4XPages.Delegate.Activity_PermissionResult(Permission, Result)
don't know what else to try..
 
Upvote 0
Top