Sub CheckPermissions
For Each permission As String In Array(rp.PERMISSION_ACCESS_FINE_LOCATION, rp.PERMISSION_WRITE_EXTERNAL_STORAGE, rp.PERMISSION_READ_EXTERNAL_STORAGE, rp.PERMISSION_CAMERA, rp.PERMISSION_READ_PHONE_STATE)
rp.CheckAndRequest(permission)
Wait For Activity_PermissionResult (permission As String, Result As Boolean)
If Result = False Then
Msgbox2Async("You have chosen NOT to allow some Permissions and the App cannot work without them. Please allow in Settings>Apps>*********>App Permissions","********","OK","","",LoadBitmap(File.DirAssets,"question.png"),False)
Wait for msgbox_result (Result1 As Int)
If Result1 =DialogResponse.POSITIVE Then
Activity.Finish
Return
End If
End If
Next
End Sub