I am building a SIP/VOIP app but a can't seem to get the run time permissions right.
I added this to the Activity_Create
B4X:
rp.CheckAndRequest(rp.PERMISSION_USE_SIP)
in the Activity_PermissionResult
B4X:
Log($"Permission: ${Permission} Result: ${Result}"$)
If Result Then
If SIP.IsInitialized = False Then
If SIP.IsSipSupported = False Or SIP.IsVoipSupported = False Then
ToastMessageShow("unsupported SIP", True)
Else
SIP.Initialize2("SIP", "sip:123123@212.122.59.128" , "55555")
SIP.Register
End If
End If
End If
hahahha..
solved after restart my laptop... damn i hate windows
there's no permission dialog after call rp.CheckAndRequest, but automatically ON in setting permission app.
SIP (and etc danger permission) is Working now with my Xiaomi MI4W android v 6.0.1
It will work properly in all cases. On Android 5- or if targetSdkVersion is set to 22- then the event will be raised without showing the permission dialog (result will be true).