CSipSimple - java.lang.SecurityException:Permission Denial:不允许发送广播android.intent.action.Phone_State

时间:2015-02-26 10:55:31

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

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]

1 个答案:

答案 0 :(得分:0)

在清单

中添加以下行
  <uses-permission android:name="android.permission.READ_PHONE_STATE"/>