My minSDK is 14 and the target is 26.
Both codes below works in Android 6 and 7, but I tested in the Android 4.0 and one works and the other don't:
This code works:
but this don't:
Why?
Both codes below works in Android 6 and 7, but I tested in the Android 4.0 and one works and the other don't:
This code works:
B4X:
Sub btnOpenFile_Click
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_READ_EXTERNAL_STORAGE)
End Sub
Sub Activity_PermissionResult (Permission As String, Result As Boolean)
If Permission = Starter.rp.PERMISSION_READ_EXTERNAL_STORAGE Then
OpenMyFile
End If
End Sub
Sub OpenMyFile
Msgbox2Async("Do you want to continue?", "Import file", "Yes", "", "Cancel", Null, True)
Wait For Msgbox_Result (Result As Int)
If Result = DialogResponse.POSITIVE Then
Dim dlgFileExpl As ClsExplorer
(...)
End Sub
End Sub
but this don't:
B4X:
Sub btnOpenFile_Click
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_READ_EXTERNAL_STORAGE)
Wait for Activity_PermissionResult (Permission As String, Result As Boolean)
If Result Then
OpenMyFile
End If
End Sub
Sub OpenMyFile
(...)
End Sub
Why?