Mihai Rainer Jr. Member Licensed User Longtime User Jan 17, 2019 #1 On the second activity create sub I am trying to use Code: 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?
On the second activity create sub I am trying to use Code: 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 Jan 17, 2019 #2 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
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
Mihai Rainer Jr. Member Licensed User Longtime User Jan 17, 2019 #3 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
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
Erel B4X founder Staff member Licensed User Longtime User Jan 17, 2019 #4 Two additional mistakes: 1. Don't use Check unless you are calling it from a service. 2. You should use Wait For Activity_PermissionResult. Upvote 0
Two additional mistakes: 1. Don't use Check unless you are calling it from a service. 2. You should use Wait For Activity_PermissionResult.
Mihai Rainer Jr. Member Licensed User Longtime User Jan 17, 2019 #5 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
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
Sai Main Seng Kham Member Licensed User Jul 23, 2019 #6 c Mihai Rainer Jr. said: 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 Click to expand... can u show how to solve it. i have the same problem. the permission is always false Upvote 0
c Mihai Rainer Jr. said: 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 Click to expand... can u show how to solve it. i have the same problem. the permission is always false
Mihai Rainer Jr. Member Licensed User Longtime User Jul 23, 2019 #7 Sai Main Seng Kham said: c can u show how to solve it. i have the same problem. the permission is always false Click to expand... i just simply added the camera in the manifest, then it starts showing the permission dialog. Upvote 0
Sai Main Seng Kham said: c can u show how to solve it. i have the same problem. the permission is always false Click to expand... i just simply added the camera in the manifest, then it starts showing the permission dialog.
Erel B4X founder Staff member Licensed User Longtime User Jul 23, 2019 #8 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. Upvote 0
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.
Sai Main Seng Kham Member Licensed User Jul 23, 2019 #9 Erel said: 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. Click to expand... @Erel the list permission is empty. Runing My App showing permission error so how can i solve it? Upvote 0
Erel said: 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. Click to expand... @Erel the list permission is empty. Runing My App showing permission error so how can i solve it?
Erel B4X founder Staff member Licensed User Longtime User Jul 23, 2019 #10 1. Always start a new thread for your questions. 2. Post the full error message in the new thread. Upvote 0
Sai Main Seng Kham Member Licensed User Jul 23, 2019 #11 Erel said: 1. Always start a new thread for your questions. 2. Post the full error message in the new thread. Click to expand... what if nobody answer my thread Upvote 0
Erel said: 1. Always start a new thread for your questions. 2. Post the full error message in the new thread. Click to expand... what if nobody answer my thread
Erel B4X founder Staff member Licensed User Longtime User Jul 23, 2019 #12 Where is that thread? Upvote 0
Sai Main Seng Kham Member Licensed User Jul 23, 2019 #13 https://www.b4x.com/android/forum/threads/tutorial-of-using-facebook-account-kit-on-b4a.107930/ that Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jul 23, 2019 #14 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. Feature requests are usually not answered (important to read: https://www.b4x.com/android/forum/threads/a-few-words-about-feature-requests.69064/) Upvote 0
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. Feature requests are usually not answered (important to read: https://www.b4x.com/android/forum/threads/a-few-words-about-feature-requests.69064/)