How to add a system SIP account

With support for VoIP support based on Android version 2.3 has become available. How can I add a SIP account from my application? I think the solution might be to use a system settings content provider. But I don’t know how to do this.

+6
source share
1 answer

There is no system content provider for the SIP account.

There are only two ways to do this,

At first,

You can trigger SIP system activity using intent.

if (SipManager.isVoipSupported(this) && SipManager.isApiSupported(this)){ // SIP is supported, let go! Intent intent = new Intent(); intent.setAction("android.intent.action.MAIN"); intent.setComponent(ComponentName.unflattenFromString("com.android.phone/.sip.SipSettings")); startActivity(intent); } 

Secondly,

You can register a SIP account for a specific period of time using the class android.net.sip.SipManager .

If you need more clarification than you can ask me right here ... !!!

+5
source

Source: https://habr.com/ru/post/907922/


All Articles