On the second activity create sub I am trying to use
B4X:
If perm.Check("PERMISSION_CAMERA") = False Then
Log("Has no camera permission. Asking permission...")
perm.Checkandrequest(perm.PERMISSION_CAMERA)
End If
Sub Activity_PermissionResult(lpermission As String,lresult As Boolean)
Log(lpermission)
Log(lresult)
End Sub
The problem is that there is no dialog asking for permission and the result is always False.
B4A 8.50, RuntimePpermissions Library 1.10, Android SDK 28. Tested on Andoid 6 phone and Android 8.1
Is there something I miss about this?
Yes, I have a barcode scanner custom view. Meantime, I found that I made a childish mistake, not announcing camera in the manifest file. I think I need a rest sometimes
Yes, Erel, you are right, but, I have simplified all things for testing, because it simply did not triggered the permission dialog
Just missing the manifest thing was my problem. Now, I will move the code in the proper position and handle the result
Yes, Erel, you are right, but, I have simplified all things for testing, because it simply did not triggered the permission dialog
Just missing the manifest thing was my problem. Now, I will move the code in the proper position and handle the result
Tip: click on List Permissions (Logs tab). If the relevant permission is not listed and marked as a dangerous permission then the dialog will never appear.
Tip: click on List Permissions (Logs tab). If the relevant permission is not listed and marked as a dangerous permission then the dialog will never appear.
How is this relevant to this question?
You requested a tutorial about something. Which answer do you expect? There might a tutorial about it in the future.