Greetings,
I used some of the code from a tutorial for background location checking in my app and the logs statements get stuck in a loop. This is the tutorial and this is the code based on the tutorial I used in my app.
I expected a dialog screen to appear asking for the permission since the permission was not set yet. Also the Log displayed is from Result = False. Instead of the screen asking for the permission the Log statement keeps repeating as if it's in a loop.
I initially though something needed to be added to the manifest but the sample app from the tutorial did not have anything added in the manifest editor.
What additional coding to the app or manifest editor should I add to stop the loop?
Thanks.
I used some of the code from a tutorial for background location checking in my app and the logs statements get stuck in a loop. This is the tutorial and this is the code based on the tutorial I used in my app.
B4X:
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_READ_PHONE_STATE)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result Then
Log("We have permission")
Else
Log("We don't have permission")
End If
I expected a dialog screen to appear asking for the permission since the permission was not set yet. Also the Log displayed is from Result = False. Instead of the screen asking for the permission the Log statement keeps repeating as if it's in a loop.
I initially though something needed to be added to the manifest but the sample app from the tutorial did not have anything added in the manifest editor.
What additional coding to the app or manifest editor should I add to stop the loop?
Thanks.