如何使自己的自定义拨号程序在Android手机自己的、自定义、程序、手机

2023-09-12 07:46:33 作者:北巷九命猫

在我的应用程序添加一个意图,使用户可以拨打电话:

In my application I add an intent so that the user can call:

str="tel:"+phoneArray[11];  
Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse(str));
startActivity(intent);

然后将其从Android手机通话,但我想设置其他自定义拨号器设置不同的外观。有什么需要做什么?我的意思不是如何设计的拨号器,而只是如何使进入的数量和执行呼叫的用户界面。

Then it calls from Android phone but I want to set up another custom dialer with a different look. What do need to do? I do not mean how to design the dialer, but only how to make a UI that will enter the number and execute a call.

推荐答案

创建一个应用程序,响应 Intent.ACTION_DIAL 。在的Andr​​oidManifest.xml 您需要添加以下到活动:

Create an app that responds to Intent.ACTION_DIAL. In the AndroidManifest.xml you need to add the following to that Activity:

<intent-filter>
    <action android:name="android.intent.action.DIAL" />
    <category android:name="android.intent.category.DEFAULT" />
</intent-filter>

您可以乘坐官方手机应用作为参考。但要注意,这并非易事。

You can take the official phone app as reference. But be warned, it is no trivial task.

您只能更换拨号的方式。实际调用的东西(你在通话过程中看到的)不能改变。

You can replace only the Dialer that way. The actual calling thing (what you see during calls) can't be changed.

有关详细信息,请参阅堆栈溢出问题的 的Andr​​oid拨号器应用程序 的。

For more information, see Stack Overflow question Android dialer application.

 
精彩推荐