Hi everyone,
I'm moving part of my code done in a B4XPage into a Standard Class.
In this code i've a Runtime Permission CheckAndRequest that requires the "Wait For" block
Well... in this manner this does not work, the "Wait For" will never fire because it calls the "B4XPage_PermissionResult" in the module where I declared the class.
Example:
1. I initialized the "ClassA" in the B4XPage called "Home"
2. In the "ClassA" there is the Runtime Permission WaitFor
3. When it should be fired, insted, this appears in the Logs ->
It is delegated to the B4XPage instead of the Class...
How can i solve this issue (beside of moving the check outside the class)?
Thanks in advance
I'm moving part of my code done in a B4XPage into a Standard Class.
In this code i've a Runtime Permission CheckAndRequest that requires the "Wait For" block
B4X:
Private Sub BeginBLEscan
rp_ble.CheckAndRequest(rp_ble.PERMISSION_ACCESS_FINE_LOCATION)
Wait For B4XPage_PermissionResult (Permission As String, Result As Boolean)
If Result = False Then
ToastMessageShow("Permesso Bluetooth non fornito", True)
Return
End If
End Sub
Well... in this manner this does not work, the "Wait For" will never fire because it calls the "B4XPage_PermissionResult" in the module where I declared the class.
Example:
1. I initialized the "ClassA" in the B4XPage called "Home"
2. In the "ClassA" there is the Runtime Permission WaitFor
3. When it should be fired, insted, this appears in the Logs ->
*** home: B4XPage_PermissionResult [home]
It is delegated to the B4XPage instead of the Class...
How can i solve this issue (beside of moving the check outside the class)?
Thanks in advance