【问题标题】:CSipSimple - java.lang.SecurityException : Permission Denial: not allowed to send broadcast android.intent.action.Phone_StateCSipSimple - java.lang.SecurityException:权限拒绝:不允许发送广播 android.intent.action.Phone_State
【发布时间】:2015-02-26 10:55:31
【问题描述】:

CSipSimple。需要帮助。我正在尝试构建一个 VoIP 应用程序,使用户能够通过 CSipSimple 的本地向导呼叫 WLAN 中的任何设备。这是我在 Kitkat(4.4.2) CM 11 上单击呼叫按钮时遇到的错误。

java.lang.SecurityException : Permission Denial: 不允许发送广播 android.intent.action.Phone_State 。帮帮我。

我附上日志文件以供参考。

02-26 16:17:12.236: E/AndroidRuntime(13207): FATAL EXCEPTION: UAStateAsyncWorker
02-26 16:17:12.236: E/AndroidRuntime(13207): Process: com.csipsimple:sipStack, PID: 13207
02-26 16:17:12.236: E/AndroidRuntime(13207): java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.intent.action.PHONE_STATE from pid=13207, uid=10271
02-26 16:17:12.236: E/AndroidRuntime(13207):    at android.os.Parcel.readException(Parcel.java:1472)
02-26 16:17:12.236: E/AndroidRuntime(13207):    at android.os.Parcel.readException(Parcel.java:1426)
02-26 16:17:12.236: E/AndroidRuntime(13207):    at android.app.ActivityManagerProxy.broadcastIntent(ActivityManagerNative.java:2392)
02-26 16:17:12.236: E/AndroidRuntime(13207):    at android.app.ContextImpl.sendBroadcast(ContextImpl.java:1205)
02-26 16:17:12.236: E/AndroidRuntime(13207):    at android.content.ContextWrapper.sendBroadcast(ContextWrapper.java:370)
02-26 16:17:12.236: E/AndroidRuntime(13207):    at com.csipsimple.pjsip.UAStateReceiver.broadCastAndroidCallState(UAStateReceiver.java:910)
02-26 16:17:12.236: E/AndroidRuntime(13207):    at com.csipsimple.pjsip.UAStateReceiver.access$3(UAStateReceiver.java:902)
02-26 16:17:12.236: E/AndroidRuntime(13207):    at com.csipsimple.pjsip.UAStateReceiver$WorkerHandler.handleMessage(UAStateReceiver.java:749)
02-26 16:17:12.236: E/AndroidRuntime(13207):    at android.os.Handler.dispatchMessage(Handler.java:102)
02-26 16:17:12.236: E/AndroidRuntime(13207):    at android.os.Looper.loop(Looper.java:136)
02-26 16:17:12.236: E/AndroidRuntime(13207):    at android.os.HandlerThread.run(HandlerThread.java:61)
02-26 16:17:12.246: E/libpjsip(13207): 16:17:12.252   pjsua_call.c !.Unable to send initial INVITE request: gethostbyname() has returned error (PJ_ERESOLVE) [status=70018]

【问题讨论】:

    标签: android voip android-4.4-kitkat pjsip csip-simple


    【解决方案1】:

    在清单中添加以下行

      <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-02-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-05-13
      • 1970-01-01
      相关资源
      最近更新 更多