Android Question Runtime Permissions does not trigger the dialog

Status
Not open for further replies.

Mihai Rainer Jr.

Member
Licensed User
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?
 

Geezer

Active Member
Licensed User
Longtime User
Do you have code in your app that will actually use the camera, rather than just asking for permission ?

Some permissions are not asked for unless the app is going to specifically use them
 
Upvote 0

Mihai Rainer Jr.

Member
Licensed User
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 :)
 
Upvote 0

Mihai Rainer Jr.

Member
Licensed User
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 :)
 
Upvote 0

Sai Main Seng Kham

Member
Licensed User
c
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 :)
can u show how to solve it.
i have the same problem.
the permission is always false
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
Status
Not open for further replies.
Top