SipManager 无法创建 SipService.无法在牛轧糖中绑定 Context.SIP_SERVICE [英] SipManager cannot create SipService. Cannot Bind Context.SIP_SERVICE in Nougat

查看:40
本文介绍了SipManager 无法创建 SipService.无法在牛轧糖中绑定 Context.SIP_SERVICE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用 SipManager 打开 SIP 配置文件的应用程序.我在旧(奇巧)设备上打开 SIP 配置文件没有任何困难,但我的新(牛轧糖)设备抛出 SipException SipService 已死,正在重新启动..."

I have an application that uses SipManager to open a SIP profile. I have no difficulties opening the SIP profile on my older(KitKat) device, but my new(Nougat) device throws the a SipException "SipService is dead and is restarting..."

单步执行 SipManager 会发现createSipService"未绑定Context.SIP_SERVICE".

Stepping through the SipManager reveals that 'createSipService' is not binding 'Context.SIP_SERVICE'.

我找到了这篇文章,这似乎是同一个问题.

I found this post, which seems to be the same issue.

有谁知道 KitKat 和 Nougat 之间发生了什么变化会导致这样的错误,我可以做些什么来解决它?

Does anyone know what changed between KitKat and Nougat that would cause such an error, and what I can do to resolve it?

更新

这是我在尝试运行 mySipManager.open(mSipProfile, pendingIntent, null) 时遇到的异常;

This is the Exception I get when trying to run mySipManager.open(mSipProfile, pendingIntent, null);

`

W/System.err: android.net.sip.SipException: SipService is dead and is restarting...
W/System.err:     at android.net.sip.SipManager.checkSipServiceConnection(SipManager.java:183)
                  at android.net.sip.SipManager.open(SipManager.java:244)
W/System.err:     at com.example.angrinord.myApplication.MyApplication.refreshSipManager(MyApplication.java:59)
                  at com.example.angrinord.myApplication.MyApplication.onCreate(MyApplication.java:41)
W/System.err:     at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1032)
                  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6017)
W/System.err:     at android.app.ActivityThread.-wrap3(ActivityThread.java)
W/System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1727)
                  at android.os.Handler.dispatchMessage(Handler.java:102)
W/System.err:     at android.os.Looper.loop(Looper.java:154)
                  at android.app.ActivityThread.main(ActivityThread.java:6823)
W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1557)
                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1445

)`

这发生在运行 .open() 和 .close() 时.

This happens on running .open() and .close().

更新 2

我刚买了一个 Pixel 3 (Android 9),它没有这个问题.我不能说 5,6 或 8,但这可能是 7 的错误,因为 4 和 9 都没有问题.

I just bought a Pixel 3 (Android 9) and it does not have the issue. I can't speak for 5,6, or 8, but this maybe a bug with 7, as both 4 and 9 do not have the issue.

推荐答案

您的设备是否启用(或可以启用)Wifi 通话?

Is Wifi Calling enabled (or can be enabled) on your device?

我在 Asus(型号 X00PD)上有同样的问题,android 是 8.0.

I have the same issue with an Asus (model X00PD), android is 8.0.

SipManager.IsApiSupported() 和 SipManager.IsVoipSupported() 都返回 true,但是,如果我在 Developer options 下查看服务,Wifi Calling 没有运行,并且 Asus ui 禁用了启用它的选项.

SipManager.IsApiSupported() and SipManager.IsVoipSupported() both return true, however, if I view services under Developer options, Wifi Calling is not running, and the Asus ui disables the option to enable it.

相比之下,Wifi-Calling 服务默认在我的 S8(也是 8.0)上运行.与较旧的 S6(7.0) 和诺基亚 6.1(8.1) 相同.

To contrast the Wifi-Calling service is running on my S8 (also 8.0), by default. Same with an older S6(7.0) and a Nokia 6.1(8.1).

这篇关于SipManager 无法创建 SipService.无法在牛轧糖中绑定 Context.SIP_SERVICE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆