Android Question SIP Problem with Android v6

devpialkt

Member
Licensed User
Longtime User
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


Result :
B4X:
Permission: android.permission.USE_SIP Result: false
I get an error telling me that I need the android.permission.USE_SIP


Thanks
 

devpialkt

Member
Licensed User
Longtime User
hahahha.. :oops:
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

Thanks Erel ... you are always the best ... :rolleyes:
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
there's no permission dialog after call rp.CheckAndRequest, but automatically ON in setting permission app.
i guess you have set your targetsdk to 22 or lower?
Set it to 23+ if you want to have the permissionsystem active
 
Upvote 0

devpialkt

Member
Licensed User
Longtime User
wait.. i will check configure path dan targetsdk in manifest editor

btw, what's will happen if targetsdk lower than 23 but then install apk in gadget with sdk 23 ??

thanks for advise
 
Upvote 0
Top