我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) 有什么办法可以检测到拨出电话是否成功接听或接听?我Intent.ACTION_CALL用于拨打电话并PhoneCallListener在拨出电话接听时查找通话状态,但我无法实现这一目标。这在android中可能吗?
android telephony phone-call broadcastreceiver telephonymanager