Partager via


TelecomManager Class

Definition

Provides access to information about active calls and registration/call-management functionality.

[Android.Runtime.Register("android/telecom/TelecomManager", DoNotGenerateAcw=true)]
public class TelecomManager : Java.Lang.Object
[<Android.Runtime.Register("android/telecom/TelecomManager", DoNotGenerateAcw=true)>]
type TelecomManager = class
    inherit Object
Inheritance
TelecomManager
Attributes

Remarks

Provides access to information about active calls and registration/call-management functionality. Apps can use methods in this class to determine the current call state.

Apps do not instantiate this class directly; instead, they retrieve a reference to an instance through Context#getSystemService Context.getSystemService(Context.TELECOM_SERVICE).

Note that access to some telecom information is permission-protected. Your app cannot access the protected information or gain access to protected functionality unless it has the appropriate permissions declared in its manifest file. Where permissions apply, they are noted in the method descriptions.

Java documentation for android.telecom.TelecomManager.

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.

Constructors

TelecomManager(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Fields

ActionChangeDefaultDialer

Activity action: Shows a dialog asking the user whether or not they want to replace the current default Dialer with the one specified in #EXTRA_CHANGE_DEFAULT_DIALER_PACKAGE_NAME.

ActionChangePhoneAccounts

The android.content.Intent action used to show the settings page used to configure PhoneAccount preferences.

ActionConfigurePhoneAccount

An android.content.Intent action sent by the telecom framework to start a configuration dialog for a registered PhoneAccount.

ActionDefaultCallScreeningAppChanged

Broadcast intent action indicating that the current default call screening app has changed.

ActionDefaultDialerChanged

Broadcast intent action indicating that the current default dialer has changed.

ActionIncomingCall

Activity action: Starts the UI for handing an incoming call.

ActionPhoneAccountRegistered

android.content.Intent action used indicate that a new phone account was just registered.

ActionPhoneAccountUnregistered

android.content.Intent action used indicate that a phone account was just unregistered.

ActionPostCall

Start an activity indicating that the completion of an outgoing call or an incoming call which was not blocked by the CallScreeningService, and which was NOT terminated while the call was in Call#STATE_AUDIO_PROCESSING.

ActionShowCallAccessibilitySettings

The android.content.Intent action used to show the call accessibility settings page.

ActionShowCallSettings

The android.content.Intent action used to show the call settings page.

ActionShowMissedCallsNotification

Broadcast intent action for letting custom component know to show the missed call notification.

ActionShowRespondViaSmsSettings

The android.content.Intent action used to show the respond via SMS settings page.

DtmfCharacterPause

The dual tone multi-frequency signaling character sent to indicate the dialing system should pause for a predefined period.

DtmfCharacterWait

The dual-tone multi-frequency signaling character sent to indicate the dialing system should wait for user confirmation before proceeding.

DurationLong
Obsolete.

A integer value for #EXTRA_CALL_DURATION, indicates the duration of the completed call was >= 120 seconds.

DurationMedium
Obsolete.

A integer value for #EXTRA_CALL_DURATION, indicates the duration of the completed call was >= 60 seconds and < 120 seconds.

DurationShort
Obsolete.

A integer value for #EXTRA_CALL_DURATION, indicates the duration of the completed call was >= 3 seconds and < 60 seconds.

DurationVeryShort
Obsolete.

A integer value for #EXTRA_CALL_DURATION, indicates the duration of the completed call was < 3 seconds.

ExtraCallBackNumber

The number which the party on the other side of the line will see (and use to return the call).

ExtraCallDisconnectCause

Optional extra for android.telephony.TelephonyManager#ACTION_PHONE_STATE_CHANGED containing the disconnect code.

ExtraCallDisconnectMessage

Optional extra for android.telephony.TelephonyManager#ACTION_PHONE_STATE_CHANGED containing the disconnect message.

ExtraCallDuration

A integer value provided for completed calls to indicate the duration of the call.

ExtraCallNetworkType

Optional extra for communicating the call network technology used by a android.telecom.Connection to Telecom and InCallUI.

ExtraCallSubject

Optional extra for android.content.Intent#ACTION_CALL containing a string call subject which will be associated with an outgoing call.

ExtraChangeDefaultDialerPackageName

Extra value used to provide the package name for #ACTION_CHANGE_DEFAULT_DIALER.

ExtraDefaultCallScreeningAppComponentName

Extra value used with #ACTION_DEFAULT_CALL_SCREENING_APP_CHANGED broadcast to indicate the ComponentName of the call screening app which has changed.

ExtraDisconnectCause

A integer value provided for completed calls to indicate the reason for the call disconnection.

ExtraHandle

A Uri extra, which when set on the #ACTION_POST_CALL intent, indicates the uri handle(phone number) of the completed call.

ExtraHasPicture

A boolean extra set on incoming calls to indicate that the call has a picture specified.

ExtraIncomingCallAddress

The extra used by a ConnectionService to provide the handle of the caller that has initiated a new incoming call.

ExtraIncomingCallExtras

Optional extra for #ACTION_INCOMING_CALL containing a Bundle which contains metadata about the call.

ExtraIncomingVideoState

Optional extra for #addNewIncomingCall(PhoneAccountHandle, Bundle) containing an integer that determines the requested video state for an incoming call.

ExtraIsDefaultCallScreeningApp

Extra value used with #ACTION_DEFAULT_CALL_SCREENING_APP_CHANGED broadcast to indicate whether an app is the default call screening app.

ExtraLocation

Extra for the call composer call location, an android.location.Location parcelable class to represent the geolocation as a latitude and longitude pair.

ExtraNotificationCount

The number of calls associated with the notification.

ExtraNotificationPhoneNumber

The number associated with the missed calls.

ExtraOutgoingCallExtras

Optional extra for android.content.Intent#ACTION_CALL and android.content.Intent#ACTION_DIALIntent containing a Bundle which contains metadata about the call.

ExtraOutgoingPicture

A ParcelUuid used as a token to represent a picture that was uploaded prior to the call being placed.

ExtraPhoneAccountHandle

The extra used with an android.content.Intent#ACTION_CALL and android.content.Intent#ACTION_DIALIntent to specify a PhoneAccountHandle to use when making the call.

ExtraPictureUri

A Uri representing the picture that was downloaded when a call is received or uploaded when a call is placed.

ExtraPriority

Extra for the call composer call priority, either #PRIORITY_NORMAL or #PRIORITY_URGENT.

ExtraStartCallWithRtt

A boolean extra, which when set on the Intent#ACTION_CALL intent or on the bundle passed into #placeCall(Uri, Bundle), indicates that the call should be initiated with an RTT session open.

ExtraStartCallWithSpeakerphone

Optional extra for android.content.Intent#ACTION_CALL containing a boolean that determines whether the speakerphone should be automatically turned on for an outgoing call.

ExtraStartCallWithVideoState

Optional extra for android.content.Intent#ACTION_CALL containing an integer that determines the desired video state for an outgoing call.

ExtraUseAssistedDialing

The boolean indicated by this extra controls whether or not a call is eligible to undergo assisted dialing.

GatewayOriginalAddress

An optional android.content.Intent#ACTION_CALL intent extra corresponding to the original address to dial for the call.

GatewayProviderPackage

An optional android.content.Intent#ACTION_CALL intent extra denoting the package name of the app specifying an alternative gateway for the call.

MetadataInCallServiceCarModeUi

A boolean meta-data value indicating whether an InCallService implements an in-call user interface to be used while the device is in car-mode (see android.content.res.Configuration#UI_MODE_TYPE_CAR).

MetadataInCallServiceRinging

A boolean meta-data value indicating whether an InCallService implements ringing.

MetadataInCallServiceUi

A boolean meta-data value indicating whether an InCallService implements an in-call user interface.

MetadataIncludeExternalCalls

A boolean meta-data value indicating whether an InCallService wants to be informed of calls which have the Call.Details#PROPERTY_IS_EXTERNAL_CALL property.

MetadataIncludeSelfManagedCalls

A boolean meta-data value indicating whether an InCallService wants to be informed of calls which have the Call.Details#PROPERTY_SELF_MANAGED property.

PresentationUnavailable
Obsolete.

Indicates that the address or number of a call is unavailable.

PriorityNormal
Obsolete.

Indicates the call composer call priority is normal.

PriorityUrgent
Obsolete.

Indicates the call composer call priority is urgent.

Properties

CallCapablePhoneAccounts

Returns a list of PhoneAccountHandles which can be used to make and receive phone calls.

Class

Returns the runtime class of this Object.

(Inherited from Object)
DefaultDialerPackage

Used to determine the currently selected default dialer package.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
HasManageOngoingCallsPermission

Returns whether the caller has android.Manifest.permission#MANAGE_ONGOING_CALLS permission.

IsInCall

Returns whether there is an ongoing phone call (can be in dialing, ringing, active or holding states) originating from either a manager or self-managed ConnectionService.

IsInManagedCall

Returns whether there is an ongoing call originating from a managed ConnectionService.

IsTtySupported

Returns whether TTY is supported on this device.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
OwnSelfManagedPhoneAccounts

Returns a list of PhoneAccountHandles owned by the calling self-managed ConnectionService.

PeerReference (Inherited from Object)
SelfManagedPhoneAccounts

Returns a list of PhoneAccountHandles for all self-managed ConnectionServices owned by the calling UserHandle.

SimCallManager

Returns the current SIM call manager.

SystemDialerPackage

Determines the package name of the system-provided default phone app.

ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

UserSelectedOutgoingPhoneAccount

Return the PhoneAccount which is the user-chosen default for making outgoing phone calls.

Methods

AcceptHandover(Uri, VideoProfileState, PhoneAccountHandle)

Called by an app to indicate that it wishes to accept the handover of an ongoing call to a PhoneAccountHandle it defines.

AcceptRingingCall()

If there is a ringing incoming call, this method accepts the call on behalf of the user.

AcceptRingingCall(Int32)

If there is a ringing incoming call, this method accepts the call on behalf of the user, with the specified video state.

AddCall(CallAttributes, IExecutor, IOutcomeReceiver, ICallControlCallback, ICallEventCallback)

Add a call to the Android system service Telecom.

AddNewIncomingCall(PhoneAccountHandle, Bundle)

Registers a new incoming call.

AddNewIncomingConference(PhoneAccountHandle, Bundle)

Registers a new incoming conference.

CancelMissedCallsNotification()

Removes the missed-call notification if one is present and marks missed calls in the call log as read.

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
CreateManageBlockedNumbersIntent()

Creates the Intent which can be used with Context#startActivity(Intent) to launch the activity to manage blocked numbers.

Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
EndCall()

Ends the foreground call on the device.

Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetAdnUriForPhoneAccount(PhoneAccountHandle)

Returns a URI (with the content:// scheme) specific to the specified PhoneAccount for ADN content retrieval.

GetDefaultOutgoingPhoneAccount(String)

Return the PhoneAccount which will be used to place outgoing calls to addresses with the specified uriScheme.

GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetLine1Number(PhoneAccountHandle)

Return the line 1 phone number for given phone account.

GetPhoneAccount(PhoneAccountHandle)

Return the PhoneAccount for a specified PhoneAccountHandle.

GetSimCallManagerForSubscription(Int32)

Returns current SIM call manager for the Telephony Subscription ID specified.

GetVoiceMailNumber(PhoneAccountHandle)

Return the voicemail number for a given phone account.

HandleMmi(String, PhoneAccountHandle)

Processes the specified dial string as an MMI code.

HandleMmi(String)

Processes the specified dial string as an MMI code.

IsIncomingCallPermitted(PhoneAccountHandle)

Determines whether Telecom would permit an incoming call to be added via the #addNewIncomingCall(PhoneAccountHandle, Bundle) API for the specified PhoneAccountHandle.

IsOutgoingCallPermitted(PhoneAccountHandle)

Determines whether Telecom would permit an outgoing call to be placed via the #placeCall(Uri, Bundle) API for the specified PhoneAccountHandle.

IsVoiceMailNumber(PhoneAccountHandle, String)

Return whether a given phone number is the configured voicemail number for a particular phone account.

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
PlaceCall(Uri, Bundle)

Places a new outgoing call to the provided address using the system telecom service with the specified extras.

RegisterPhoneAccount(PhoneAccount)

Register a PhoneAccount for use by the system that will be stored in Device Encrypted storage.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ShowInCallScreen(Boolean)

Brings the in-call screen to the foreground if there is an ongoing call.

SilenceRinger()

Silences the ringer if a ringing call exists.

StartConference(IList<Uri>, Bundle)

Place a new adhoc conference call with the provided participants using the system telecom service.

ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
UnregisterPhoneAccount(PhoneAccountHandle)

Remove a PhoneAccount registration from the system.

Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to