Android Question Runtime permission Problem

ilan

Expert
Licensed User
Longtime User
hi

i have problems with Runtimepermission on B4A8+.
when i check for the permission and also request it and the result was false the request is not done.

the weird thing is that in DEBUG mode everything works fine but if i run it in release mode the check/request of the permission does only a check and not a request

i have updated to B4A 8.3 but still the same. i remember that in the past it worked fine.

what could be the reason for that?

this is my code:

B4X:
Sub userpnlimg_Click 'set new image to the user and save
    Wait For(checkifDirecteryexistsandcreate) Complete (Result As Boolean)
    If Result = False Then Return
    Try
         cr.Show("image/*", "Choose image")
    Catch
        Log(LastException)
    End Try
End Sub

Sub checkifDirecteryexistsandcreate As ResumableSub
    Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
    wait for Activity_PermissionResult(Permission As String,  Result As Boolean)
    If Result = False  Then
        MsgboxAsync("יש צורך בלאשר את ההרשאה כדי להמשיך","הודעה")
        Wait For MsgBox_Result (Result2 As Int)
        Return False
    End If
    Return True
End Sub

EDIT: again to avoid confussion, it works on DEBUG mode but not on RELEASE mode. and the same code worked in the past on older apps (Release & Debug mode).
 

ilan

Expert
Licensed User
Longtime User
Does it appear in the permissions list (in the logs tab)?

hmmm, you are right erel the permission is not listed. i thought that if i want to load an image from the gallery then i have to ask for that permission since i have photos that are saved in the phone memory and sd card memory.

permission.jpg


thank you very much !
 
Upvote 0
Top