Partager via


Intent.ActionNewOutgoingCall Field

Definition

Broadcast Action: An outgoing call is about to be placed.

[Android.Runtime.Register("ACTION_NEW_OUTGOING_CALL")]
public const string ActionNewOutgoingCall;
[<Android.Runtime.Register("ACTION_NEW_OUTGOING_CALL")>]
val mutable ActionNewOutgoingCall : string

Field Value

Implements

Attributes

Remarks

Broadcast Action: An outgoing call is about to be placed.

The Intent will have the following extra value:

<ul> <li><em>android.content.Intent#EXTRA_PHONE_NUMBER</em> - the phone number originally intended to be dialed.</li> </ul>

Once the broadcast is finished, the resultData is used as the actual number to call. If null, no call will be placed.

It is perfectly acceptable for multiple receivers to process the outgoing call in turn: for example, a parental control application might verify that the user is authorized to place the call at that time, then a number-rewriting application might add an area code if one was not specified.

For consistency, any receiver whose purpose is to prohibit phone calls should have a priority of 0, to ensure it will see the final phone number to be dialed. Any receiver whose purpose is to rewrite phone numbers to be called should have a positive priority. Negative priorities are reserved for the system for this broadcast; using them may cause problems.

Any BroadcastReceiver receiving this Intent <em>must not</em> abort the broadcast.

Emergency calls cannot be intercepted using this mechanism, and other calls cannot be modified to call emergency numbers using this mechanism.

Some apps (such as VoIP apps) may want to redirect the outgoing call to use their own service instead. Those apps should first prevent the call from being placed by setting resultData to null and then start their own app to make the call.

You must hold the android.Manifest.permission#PROCESS_OUTGOING_CALLS permission to receive this Intent.

<p class="note">This is a protected intent that can only be sent by the system.

<p class="note">If the user has chosen a android.telecom.CallRedirectionService to handle redirection of outgoing calls, this intent will NOT be sent as an ordered broadcast. This means that attempts to re-write the outgoing call by other apps using this intent will be ignored. </p>

This member is deprecated. Apps that redirect outgoing calls should use the android.telecom.CallRedirectionService API. Apps that perform call screening should use the android.telecom.CallScreeningService API. Apps which need to be notified of basic call state should use android.telephony.PhoneStateListener#onCallStateChanged(int, String) to determine when a new outgoing call is placed.

Java documentation for android.content.Intent.ACTION_NEW_OUTGOING_CALL.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to