简体   繁体   English

Android SipManager使应用程序崩溃

[英]Android SipManager make application to crash

I am developing a simple sip-based voip app for android. 我正在为Android开发一个简单的基于sip的voip应用程序。 I used this sample but there were some problems and I decided to write it step-by-step. 我使用了此示例,但是存在一些问题,因此我决定逐步编写它。

First I want to do registration on server. 首先,我想在服务器上进行注册。 I do: 我做:

SipManager manager = SipManager.newInstance(this);  
SipProfile.Builder builder = new SipProfile.Builder(number, server);
builder.setPassword(password);
SipProfile me = builder.build();

And it works fine. 而且效果很好。 But when I do 但是当我这样做

manager.register(me, 1000, null); 

or 要么

manager.open(me) 

my app crashed. 我的应用程序崩溃了。 I test this on Samsung i9000. 我在三星i9000上进行了测试。 I think a problem is somewhere in wifi connection. 我认为wifi连接存在问题。 Any advices how to fix? 任何建议如何解决?

Try to check with SipManager.isApiSupported() and SipManager.isVoipSupported() is SIP is supported on your device. 尝试检查SipManager.isApiSupported()和SipManager.isVoipSupported()是否支持您的设备上的SIP。 Perhaps Samsung disabled the SIP API. 也许三星禁用了SIP API。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM