Hi All
Has anyone experienced issues with the RuntimePermissions lib on API 24+
In the Activity_PermissionResult sub the Permission string is blank. The only Permission popup is the Phone.
The above code works on api 23 and below. The Test we did was on a real device with 24, I am running test also on 24 emulator using GeneMotion.
When you go to the app permissions the this is what you see.
You need to set them manually.
Regards
John.
Has anyone experienced issues with the RuntimePermissions lib on API 24+
B4X:
Sub Activity_Create(FirstTime As Boolean)
Dim p As Phone
Dim rp As RuntimePermissions
' // instance common data/objects
If FirstTime Then
init_timers
If Not(APPSET.IsInitialized) Then
mod_functions.intialise_app_data
End If
ac1.Initialize("AC1", ac1.VERTICAL)
make_menus_ac1
End If
' // 6.0+
If p.SdkVersion >= 23 Then
' // device
rp.CheckAndRequest(rp.PERMISSION_READ_PHONE_STATE)
rp.CheckAndRequest(rp.PERMISSION_BODY_SENSORS)
rp.CheckAndRequest(rp.PERMISSION_RECORD_AUDIO)
rp.CheckAndRequest(rp.PERMISSION_CAMERA)
rp.CheckAndRequest(rp.PERMISSION_CALL_PHONE)
rp.CheckAndRequest(rp.PERMISSION_PROCESS_OUTGOING_CALLS)
' // storage
rp.CheckAndRequest(rp.PERMISSION_READ_EXTERNAL_STORAGE)
rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE )
' // sms
rp.CheckAndRequest(rp.PERMISSION_RECEIVE_SMS)
rp.CheckAndRequest(rp.PERMISSION_READ_SMS)
rp.CheckAndRequest(rp.PERMISSION_SEND_SMS)
' // gps
rp.CheckAndRequest(rp.PERMISSION_ACCESS_COARSE_LOCATION)
rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
Else
If FirstTime Then
create_startup
End If
End If
End Sub
Sub Activity_PermissionResult (Permission As String, Result As Boolean)
mod_functions.writelog("main(), Activity_PermissionResult, " & Permission & ", " & Result)
APPSET.RP = APPSET.RP + 1
If APPSET.RP >= 10 Then
create_startup
End If
End Sub
In the Activity_PermissionResult sub the Permission string is blank. The only Permission popup is the Phone.
The above code works on api 23 and below. The Test we did was on a real device with 24, I am running test also on 24 emulator using GeneMotion.
When you go to the app permissions the this is what you see.
You need to set them manually.
Regards
John.