Comment added
This commit is contained in:
parent
3f76813e80
commit
47898e84ea
@ -2286,6 +2286,13 @@ public class Actions
|
|||||||
|
|
||||||
public static void startPhoneCall(Context context, String phoneNumber)
|
public static void startPhoneCall(Context context, String phoneNumber)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
You can use Intent.ACTION_DIAL instead of Intent.ACTION_CALL.
|
||||||
|
This shows the dialer with the number already entered, but
|
||||||
|
allows the user to decide whether to actually make the call or not.
|
||||||
|
ACTION_DIAL does not require the CALL_PHONE permission.
|
||||||
|
*/
|
||||||
|
|
||||||
Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + Uri.encode(phoneNumber)));
|
Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + Uri.encode(phoneNumber)));
|
||||||
// intent.setClassName("com.android.phone","com.android.phone.OutgoingCallBroadcaster");
|
// intent.setClassName("com.android.phone","com.android.phone.OutgoingCallBroadcaster");
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
|
Loading…
Reference in New Issue
Block a user