小编Noo*_*ani的帖子

调用Intent.ACTION_CALL时发生ActivityNotFoundException

ActivityNotFoundException在执行Intent.ACTION_CALL操作时得到.我找到了许多链接,但所有这些都无法解决我的问题.

它有时给我一些例外

android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.CALL dat=tel:xxx-xxx-xxxx pkg=com.android.phone (has extras) }
Run Code Online (Sandbox Code Playgroud)

我在我的项目中使用了以下代码

String contact_number="123456789";
Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:" + contact_number));
startActivity(callIntent);
Run Code Online (Sandbox Code Playgroud)

java android activitynotfoundexception

9
推荐指数
3
解决办法
1万
查看次数

Android - 如何检测接听或接听拨出电话?

有什么办法可以检测到拨出电话是否成功接听或接听?我Intent.ACTION_CALL用于拨打电话并PhoneCallListener在拨出电话接听时查找通话状态,但我无法实现这一目标。这在android中可能吗?

android telephony phone-call broadcastreceiver telephonymanager

5
推荐指数
1
解决办法
9139
查看次数