/**
* Broadcast to android system that we currently have a phone call. This may
* be managed by other sip apps that want to keep track of incoming calls
* for example.
*
* @param state The state of the call
* @param number The corresponding remote number
*/
private void broadCastAndroidCallState(String state, String number) {
// Android normalized event
if(!Compatibility.isCompatible(19)) {
// Not allowed to do that from kitkat
Intent intent = new Intent(ACTION_PHONE_STATE_CHANGED);
intent.putExtra(TelephonyManager.EXTRA_STATE, state);
if (number != null) {
intent.putExtra(TelephonyManager.EXTRA_INCOMING_NUMBER, number);
}
intent.putExtra(pjService.service.getString(R.string.app_name), true);
pjService.service.sendBroadcast(intent, android.Manifest.permission.READ_PHONE_STATE);
}
}
UAStateReceiver.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:CSipSimple
作者:
评论列表
文章目录