SipManager.newInstance returns null

浪尽此生 提交于 2019-12-04 09:07:10

The Problem is that Android SDK is not supported over all the devices.
you can check first whether it is supported on current device:

 if(SipManager.isVoipSupported(getApplicationContext())){
     Log.d("VOIP:", "Supported!");
 }
 else{
     Log.d("VOIP:", "Not Supported");
 }
 if(SipManager.isApiSupported(getApplicationContext())){
     Log.d("API:", "Supported!");
 }
 else{
     Log.d("API:","NotSupported!");
 }

Sometime API is supported but not VOIP. I tested on Moto E 2nd Gen. and Moto X 2014, 1st Gen. Both API and VOIP is not supported on Moto X and Only API is supported on Moto E, but VOIP is not.
To avoid this caveat, you can use 3rd party APIs such as Doubango.

Source: SIP on Android: This Article discusses this problem in detail and suggest alternative APIs.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!