从Android版本2.3开始,原生VoIP支持已经可用.如何从我的应用程序添加系统SIP帐户?我认为解决方案可能在于使用系统设置内容提供商.但我不知道究竟是怎么做到的.
SIP帐户没有可用的系统内容提供程序.
只有两种可用方式,
第一,
您可以通过意图呼叫SIP帐户系统活动.
if (SipManager.isVoipSupported(this) && SipManager.isApiSupported(this)){
// SIP is supported, let's go!
Intent intent = new Intent();
intent.setAction("android.intent.action.MAIN");
intent.setComponent(ComponentName.unflattenFromString("com.android.phone/.sip.SipSettings"));
startActivity(intent);
}
Run Code Online (Sandbox Code Playgroud)
第二,
您可以使用android.net.sip.SipManager类在特定时间段内注册SIP帐户.
如果你想要更多的澄清,你可以在这里问我...... !!!
| 归档时间: |
|
| 查看次数: |
1136 次 |
| 最近记录: |