使用意图 ACTION_CALL 拨打 911 时移动到拨号屏幕
Moving to dial screen when calling to 911 using intent with ACTION_CALL
我正在开发一款自动拨打多个号码并在完成后发送报告的应用程序。
phone 个号码之一是“*9112”。当我的应用程序尝试拨打这个号码时,它会移动到 phone 拨号应用程序,而不是启动 phone 呼叫。
我的猜测是它认为这是一个紧急号码,这就是它转移到 phone 拨号应用程序的原因。
有办法避免吗?
这是我的代码中执行自动拨号的部分:
private void makePhoneCall(String phoneNumber) {
Log.i("makePhoneCall", "Calling " + phoneNumber);
Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phoneNumber));
activity.startActivity(intent);
hangUpAndCallNextNumber();
}
这只发生在模拟器上。最终,当我在物理设备上对其进行测试时,它并没有发生。另外我没有检查它,但我认为它可能只发生在设置了 911 是紧急号码的国家(如美国和墨西哥)的模拟器上。
我正在开发一款自动拨打多个号码并在完成后发送报告的应用程序。 phone 个号码之一是“*9112”。当我的应用程序尝试拨打这个号码时,它会移动到 phone 拨号应用程序,而不是启动 phone 呼叫。 我的猜测是它认为这是一个紧急号码,这就是它转移到 phone 拨号应用程序的原因。 有办法避免吗?
这是我的代码中执行自动拨号的部分:
private void makePhoneCall(String phoneNumber) {
Log.i("makePhoneCall", "Calling " + phoneNumber);
Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phoneNumber));
activity.startActivity(intent);
hangUpAndCallNextNumber();
}
这只发生在模拟器上。最终,当我在物理设备上对其进行测试时,它并没有发生。另外我没有检查它,但我认为它可能只发生在设置了 911 是紧急号码的国家(如美国和墨西哥)的模拟器上。