Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/telecom/PhoneAccount#nestedclasses) \| [Constants](https://developer.android.com/reference/android/telecom/PhoneAccount#constants) \| [Inherited Constants](https://developer.android.com/reference/android/telecom/PhoneAccount#inhconstants) \| [Fields](https://developer.android.com/reference/android/telecom/PhoneAccount#lfields) \| [Methods](https://developer.android.com/reference/android/telecom/PhoneAccount#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/telecom/PhoneAccount#inhmethods)

# PhoneAccount

*** ** * ** ***


`
public

final

class
PhoneAccount
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


implements

https://developer.android.com/reference/android/os/Parcelable


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.telecom.PhoneAccount |

<br />

*** ** * ** ***

Represents a distinct method to place or receive a phone call. Apps which can place calls and
want those calls to be integrated into the dialer and in-call UI should build an instance of
this class and register it with the system using `https://developer.android.com/reference/android/telecom/TelecomManager`.


`https://developer.android.com/reference/android/telecom/TelecomManager` uses registered `https://developer.android.com/reference/android/telecom/PhoneAccount`s to present the user with
alternative options when placing a phone call. When building a `https://developer.android.com/reference/android/telecom/PhoneAccount`, the app
should supply a valid `https://developer.android.com/reference/android/telecom/PhoneAccountHandle` that references the connection service
implementation Telecom will use to interact with the app.

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/telecom/PhoneAccount.Builder` Helper class for creating a `https://developer.android.com/reference/android/telecom/PhoneAccount`. |

| ### Constants ||
|---|---|---|---|
| `int` | `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_ADHOC_CONFERENCE_CALLING` An adhoc conference call is established by providing a list of addresses to `TelecomManager#startConference(List<Uri>, int videoState)` where the `https://developer.android.com/reference/android/telecom/ConnectionService` is responsible for connecting all indicated participants to a conference simultaneously. |
| `int` | `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_CALL_COMPOSER` Flag indicating whether this `https://developer.android.com/reference/android/telecom/PhoneAccount` is capable of supporting the call composer functionality for enriched calls. |
| `int` | `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_CALL_PROVIDER` Flag indicating that this `PhoneAccount` can make phone calls in place of traditional SIM-based telephony calls. |
| `int` | `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_CALL_SUBJECT` Flag indicating that this `PhoneAccount` supports a subject for Calls. |
| `int` | `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_CHANGE_RTT_CALL_TO_AUDIO_CALL` Flag indicating that this `https://developer.android.com/reference/android/telecom/PhoneAccount` is capable of changing an RTT (Real-time text) call to a voice call. |
| `int` | `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_CONNECTION_MANAGER` Flag indicating that this `PhoneAccount` can act as a connection manager for other connections. |
| `int` | `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_OPT_OUT_OF_PREMIUM_NETWORK` Flag indicating that this `https://developer.android.com/reference/android/telecom/PhoneAccount` should be opted out of automatic requests for premium network capabilities. |
| `int` | `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_PLACE_EMERGENCY_CALLS` Flag indicating that this `PhoneAccount` is capable of placing emergency calls. |
| `int` | `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_RTT` Flag indicating that this `https://developer.android.com/reference/android/telecom/PhoneAccount` is capable of making a call with an RTT (Real-time text) session. |
| `int` | `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_SELF_MANAGED` *This constant was deprecated in API level 37. VoIP applications that want to integrate with the Telecom framework should transition to the new Telecom VoIP APIs which are wrapped by the [](https://developer.android.com/reference/androidx/core/telecom/CallsManager>Core Telecom</a> Jetpack Library.</em> </p> </td> </tr> <tr data-version-added=)* | `int` | `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_SIM_SUBSCRIPTION` Flag indicating that this `PhoneAccount` represents a built-in PSTN SIM subscription. |
| `int` | `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_SUPPORTS_CALL_STREAMING` Flag indicating that this voip app `https://developer.android.com/reference/android/telecom/PhoneAccount` supports the call streaming session to stream call audio to another remote device via streaming app. |
| `int` | `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_SUPPORTS_TRANSACTIONAL_OPERATIONS` Flag indicating that this `https://developer.android.com/reference/android/telecom/PhoneAccount` supports the transactional `https://developer.android.com/reference/android/telecom/TelecomManager#addCall(android.telecom.CallAttributes,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.telecom.CallControl,android.telecom.CallException>,%20android.telecom.CallControlCallback,%20android.telecom.CallEventCallback)` API for adding calls. |
| `int` | `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_SUPPORTS_VIDEO_CALLING` Flag indicating that this `https://developer.android.com/reference/android/telecom/PhoneAccount` supports video calling. |
| `int` | `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_SUPPORTS_VOICE_CALLING_INDICATIONS` Flag indicating that this `https://developer.android.com/reference/android/telecom/PhoneAccount` provides SIM-based voice calls, potentially as an over-the-top solution such as wi-fi calling. |
| `int` | `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_VIDEO_CALLING` Flag indicating that this `PhoneAccount` is currently able to place video calls. |
| `int` | `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_VIDEO_CALLING_RELIES_ON_PRESENCE` Flag indicating that for this `PhoneAccount`, the ability to make a video call to a number relies on presence. |
| `int` | `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_VOICE_CALLING_AVAILABLE` Flag indicating that this `https://developer.android.com/reference/android/telecom/PhoneAccount` is *currently* able to place SIM-based voice calls, similar to `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_VIDEO_CALLING`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/PhoneAccount#EXTRA_ADD_SELF_MANAGED_CALLS_TO_INCALLSERVICE` Boolean `https://developer.android.com/reference/android/telecom/PhoneAccount` extras key (see `https://developer.android.com/reference/android/telecom/PhoneAccount#getExtras()`) which indicates whether a Self-managed `https://developer.android.com/reference/android/telecom/PhoneAccount` want to expose its calls to all `https://developer.android.com/reference/android/telecom/InCallService` which declares the metadata `https://developer.android.com/reference/android/telecom/TelecomManager#METADATA_INCLUDE_SELF_MANAGED_CALLS`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/PhoneAccount#EXTRA_ALWAYS_USE_VOIP_AUDIO_MODE` Boolean `https://developer.android.com/reference/android/telecom/PhoneAccount` extras key (see `https://developer.android.com/reference/android/telecom/PhoneAccount#getExtras()`) which indicates that all calls from this `https://developer.android.com/reference/android/telecom/PhoneAccount` should be treated as VoIP calls rather than cellular calls by the Telecom audio handling logic. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/PhoneAccount#EXTRA_CALL_SUBJECT_CHARACTER_ENCODING` `https://developer.android.com/reference/android/telecom/PhoneAccount` extras key (see `https://developer.android.com/reference/android/telecom/PhoneAccount#getExtras()`) which determines the character encoding to be used when determining the length of messages. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/PhoneAccount#EXTRA_CALL_SUBJECT_MAX_LENGTH` `https://developer.android.com/reference/android/telecom/PhoneAccount` extras key (see `https://developer.android.com/reference/android/telecom/PhoneAccount#getExtras()`) which determines the maximum permitted length of a call subject specified via the `https://developer.android.com/reference/android/telecom/TelecomManager#EXTRA_CALL_SUBJECT` extra on an `https://developer.android.com/reference/android/content/Intent#ACTION_CALL` intent. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/PhoneAccount#EXTRA_LOG_SELF_MANAGED_CALLS` *This constant was deprecated in API level 36.1. Register `https://developer.android.com/reference/android/telecom/TelecomManager#ACTION_CALL_BACK` instead.* |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/PhoneAccount#EXTRA_SUPPORTS_HANDOVER_FROM` Boolean `https://developer.android.com/reference/android/telecom/PhoneAccount` extras key (see `https://developer.android.com/reference/android/telecom/PhoneAccount#getExtras()`) which indicates whether this `https://developer.android.com/reference/android/telecom/PhoneAccount` is capable of supporting a request to handover a connection from this `https://developer.android.com/reference/android/telecom/PhoneAccount` to another `https://developer.android.com/reference/android/telecom/PhoneAccount`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/PhoneAccount#EXTRA_SUPPORTS_HANDOVER_TO` Boolean `https://developer.android.com/reference/android/telecom/PhoneAccount` extras key (see `https://developer.android.com/reference/android/telecom/PhoneAccount#getExtras()`) which indicates whether this `https://developer.android.com/reference/android/telecom/PhoneAccount` is capable of supporting a request to handover a connection (see `android.telecom.Call#handoverTo()`) to this `https://developer.android.com/reference/android/telecom/PhoneAccount` from a `https://developer.android.com/reference/android/telecom/PhoneAccount` specifying `https://developer.android.com/reference/android/telecom/PhoneAccount#EXTRA_SUPPORTS_HANDOVER_FROM`. |
| `int` | `https://developer.android.com/reference/android/telecom/PhoneAccount#LOW_BATTERY_ALERT_DISABLED` Default value indicating that the low battery alert feature is disabled. |
| `int` | `https://developer.android.com/reference/android/telecom/PhoneAccount#NO_HIGHLIGHT_COLOR` Indicating no hightlight color is set. |
| `int` | `https://developer.android.com/reference/android/telecom/PhoneAccount#NO_RESOURCE_ID` Indicating no resource ID is set. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/PhoneAccount#SCHEME_SIP` URI scheme for SIP URIs. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/PhoneAccount#SCHEME_TEL` URI scheme for telephone number URIs. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/PhoneAccount#SCHEME_VOICEMAIL` URI scheme for voicemail URIs. |

| ### Inherited constants |
|---|
| From interface `https://developer.android.com/reference/android/os/Parcelable` |---|---| | `int` | `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor. | | `int` | `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`". | |

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/telecom/PhoneAccount>` | `https://developer.android.com/reference/android/telecom/PhoneAccount#CREATOR` |

| ### Public methods ||
|---|---|
| ` static https://developer.android.com/reference/android/telecom/PhoneAccount.Builder` | ` https://developer.android.com/reference/android/telecom/PhoneAccount#builder(android.telecom.PhoneAccountHandle,%20java.lang.CharSequence)(https://developer.android.com/reference/android/telecom/PhoneAccountHandle accountHandle, https://developer.android.com/reference/java/lang/CharSequence label) ` |
| ` int` | ` https://developer.android.com/reference/android/telecom/PhoneAccount#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| ` boolean` | ` https://developer.android.com/reference/android/telecom/PhoneAccount#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object o) ` Indicates whether some other object is "equal to" this one. |
| ` https://developer.android.com/reference/android/telecom/PhoneAccountHandle` | ` https://developer.android.com/reference/android/telecom/PhoneAccount#getAccountHandle()() ` The unique identifier of this `PhoneAccount`. |
| ` https://developer.android.com/reference/android/net/Uri` | ` https://developer.android.com/reference/android/telecom/PhoneAccount#getAddress()() ` The address (e.g., a phone number) associated with this `PhoneAccount`. |
| ` int` | ` https://developer.android.com/reference/android/telecom/PhoneAccount#getCapabilities()() ` The capabilities of this `PhoneAccount`. |
| ` https://developer.android.com/reference/android/os/Bundle` | ` https://developer.android.com/reference/android/telecom/PhoneAccount#getExtras()() ` The extras associated with this `PhoneAccount`. |
| ` int` | ` https://developer.android.com/reference/android/telecom/PhoneAccount#getHighlightColor()() ` A highlight color to use in displaying information about this `PhoneAccount`. |
| ` https://developer.android.com/reference/android/graphics/drawable/Icon` | ` https://developer.android.com/reference/android/telecom/PhoneAccount#getIcon()() ` The icon to represent this `PhoneAccount`. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/telecom/PhoneAccount#getLabel()() ` A short label describing a `PhoneAccount`. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/telecom/PhoneAccount#getShortDescription()() ` A short paragraph describing this `PhoneAccount`. |
| ` https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/android/telecom/PhoneAccountHandle>` | ` https://developer.android.com/reference/android/telecom/PhoneAccount#getSimultaneousCallingRestriction()() ` If a restriction is set (see `https://developer.android.com/reference/android/telecom/PhoneAccount#hasSimultaneousCallingRestriction()`), this method returns the Set of `https://developer.android.com/reference/android/telecom/PhoneAccountHandle`s that are allowed to support calls simultaneously with this `https://developer.android.com/reference/android/telecom/PhoneAccount`. |
| ` https://developer.android.com/reference/android/net/Uri` | ` https://developer.android.com/reference/android/telecom/PhoneAccount#getSubscriptionAddress()() ` The raw callback number used for this `PhoneAccount`, as distinct from `https://developer.android.com/reference/android/telecom/PhoneAccount#getAddress()`. |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/java/lang/String>` | ` https://developer.android.com/reference/android/telecom/PhoneAccount#getSupportedUriSchemes()() ` The URI schemes supported by this `PhoneAccount`. |
| ` boolean` | ` https://developer.android.com/reference/android/telecom/PhoneAccount#hasCapabilities(int)(int capability) ` Determines if this `PhoneAccount` has a capabilities specified by the passed in bit mask. |
| ` boolean` | ` https://developer.android.com/reference/android/telecom/PhoneAccount#hasSimultaneousCallingRestriction()() ` Whether or not this `https://developer.android.com/reference/android/telecom/PhoneAccount` contains a simultaneous calling restriction on it. |
| ` int` | ` https://developer.android.com/reference/android/telecom/PhoneAccount#hashCode()() ` Returns a hash code value for the object. |
| ` boolean` | ` https://developer.android.com/reference/android/telecom/PhoneAccount#isEnabled()() ` Indicates whether the user has enabled this `PhoneAccount` or not. |
| ` boolean` | ` https://developer.android.com/reference/android/telecom/PhoneAccount#supportsUriScheme(java.lang.String)(https://developer.android.com/reference/java/lang/String uriScheme) ` Determines if the `https://developer.android.com/reference/android/telecom/PhoneAccount` supports calls to/from addresses with a specified URI scheme. |
| ` https://developer.android.com/reference/android/telecom/PhoneAccount.Builder` | ` https://developer.android.com/reference/android/telecom/PhoneAccount#toBuilder()() ` Returns a builder initialized with the current `https://developer.android.com/reference/android/telecom/PhoneAccount` instance. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telecom/PhoneAccount#toString()() ` Returns a string representation of the object. |
| ` void` | ` https://developer.android.com/reference/android/telecom/PhoneAccount#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel out, int flags) ` Flatten this object in to a Parcel. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||
| From interface ` https://developer.android.com/reference/android/os/Parcelable ` |---|---| | ` abstract int` | ` https://developer.android.com/reference/android/os/Parcelable#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. | | ` abstract void` | ` https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) ` Flatten this object in to a Parcel. | ||

## Constants

### CAPABILITY_ADHOC_CONFERENCE_CALLING

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_ADHOC_CONFERENCE_CALLING
```

An adhoc conference call is established by providing a list of addresses to
`TelecomManager#startConference(List<Uri>, int videoState)` where the
`https://developer.android.com/reference/android/telecom/ConnectionService` is responsible for connecting all indicated participants
to a conference simultaneously.
This is in contrast to conferences formed by merging calls together (e.g. using
`https://developer.android.com/reference/android/telecom/Call#mergeConference()`).

<br />

Constant Value:

16384
(0x00004000)


### CAPABILITY_CALL_COMPOSER

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_CALL_COMPOSER
```

Flag indicating whether this `https://developer.android.com/reference/android/telecom/PhoneAccount` is capable of supporting the call composer
functionality for enriched calls.

<br />

Constant Value:

32768
(0x00008000)


### CAPABILITY_CALL_PROVIDER

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_CALL_PROVIDER
```

Flag indicating that this `PhoneAccount` can make phone calls in place of
traditional SIM-based telephony calls. This account will be treated as a distinct method
for placing calls alongside the traditional SIM-based telephony stack. This flag is
distinct from `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_CONNECTION_MANAGER` in that it is not allowed to manage
or place calls from the built-in telephony stack.


See `https://developer.android.com/reference/android/telecom/PhoneAccount#getCapabilities()`

<br />

<br />

Constant Value:

2
(0x00000002)


### CAPABILITY_CALL_SUBJECT

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_CALL_SUBJECT
```

Flag indicating that this `PhoneAccount` supports a subject for Calls. This means a
caller is able to specify a short subject line for an outgoing call. A capable receiving
device displays the call subject on the incoming call screen.


See `https://developer.android.com/reference/android/telecom/PhoneAccount#getCapabilities()`

<br />

Constant Value:

64
(0x00000040)


### CAPABILITY_CHANGE_RTT_CALL_TO_AUDIO_CALL

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_CHANGE_RTT_CALL_TO_AUDIO_CALL
```

Flag indicating that this `https://developer.android.com/reference/android/telecom/PhoneAccount` is capable of changing an RTT (Real-time text)
call to a voice call.


When set, the in-call app will display the "change to voice" option.


Only applicable for a phone account with `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_RTT`.

<br />

Constant Value:

1048576
(0x00100000)


### CAPABILITY_CONNECTION_MANAGER

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_CONNECTION_MANAGER
```

Flag indicating that this `PhoneAccount` can act as a connection manager for
other connections. The `https://developer.android.com/reference/android/telecom/ConnectionService` associated with this `PhoneAccount`
will be allowed to manage phone calls including using its own proprietary phone-call
implementation (like VoIP calling) to make calls instead of the telephony stack.


When a user opts to place a call using the SIM-based telephony stack, the
`https://developer.android.com/reference/android/telecom/ConnectionService` associated with this `PhoneAccount` will be attempted first
if the user has explicitly selected it to be used as the default connection manager.


See `https://developer.android.com/reference/android/telecom/PhoneAccount#getCapabilities()`

<br />

Constant Value:

1
(0x00000001)


### CAPABILITY_OPT_OUT_OF_PREMIUM_NETWORK

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final int CAPABILITY_OPT_OUT_OF_PREMIUM_NETWORK
```

Flag indicating that this `https://developer.android.com/reference/android/telecom/PhoneAccount` should be opted out of automatic requests for
premium network capabilities.

By default, the system may automatically request a premium network slice (such as a
slice for unified communications) on behalf of an application with
`https://developer.android.com/`, when a call is being established. Setting this
capability would allow an application to opt-out of this behaviour and manage its own network
requests, giving it more granular control over its networking.

This is intended for applications with sophisticated, custom network management logic that
prefer to handle their own network requests rather than relying on the system's automatic
behavior.

<br />

**See also:**

- `https://developer.android.com/reference/android/telecom/PhoneAccount#getCapabilities()`

Constant Value:

2097152
(0x00200000)


### CAPABILITY_PLACE_EMERGENCY_CALLS

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_PLACE_EMERGENCY_CALLS
```

Flag indicating that this `PhoneAccount` is capable of placing emergency calls.
By default all PSTN `PhoneAccount`s are capable of placing emergency calls.


See `https://developer.android.com/reference/android/telecom/PhoneAccount#getCapabilities()`

<br />

Constant Value:

16
(0x00000010)


### CAPABILITY_RTT

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_RTT
```

Flag indicating that this `https://developer.android.com/reference/android/telecom/PhoneAccount` is capable of making a call with an
RTT (Real-time text) session.
When set, Telecom will attempt to open an RTT session on outgoing calls that specify
that they should be placed with an RTT session , and the in-call app will be displayed
with text entry fields for RTT. Likewise, the in-call app can request that an RTT
session be opened during a call if this bit is set.

<br />

Constant Value:

4096
(0x00001000)


### CAPABILITY_SELF_MANAGED

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_SELF_MANAGED
```


**This constant was deprecated
in API level 37.**   

VoIP applications that want to integrate with the Telecom framework should
transition to the new Telecom VoIP APIs which are wrapped by the
[](https://developer.android.com/reference/androidx/core/telecom/CallsManager>Core
Telecom</a> Jetpack Library.
</p>
<p>Flag indicating that this <code translate=)[PhoneAccount](https://developer.android.com/reference/android/telecom/PhoneAccount) is responsible for managing its own
`https://developer.android.com/reference/android/telecom/Connection`s. This type of `https://developer.android.com/reference/android/telecom/PhoneAccount` is ideal for use with standalone
calling apps which do not wish to use the default phone app for `https://developer.android.com/reference/android/telecom/Connection` UX,
but which want to leverage the call and audio routing capabilities of the Telecom framework.


When set, `https://developer.android.com/reference/android/telecom/Connection`s created by the self-managed `https://developer.android.com/reference/android/telecom/ConnectionService` will not
be surfaced to implementations of the `https://developer.android.com/reference/android/telecom/InCallService` API. Thus it is the
responsibility of a self-managed `https://developer.android.com/reference/android/telecom/ConnectionService` to provide a user interface for
its `https://developer.android.com/reference/android/telecom/Connection`s.


Self-managed `https://developer.android.com/reference/android/telecom/Connection`s will, however, be displayed on connected Bluetooth devices.

<br />

Constant Value:

2048
(0x00000800)


### CAPABILITY_SIM_SUBSCRIPTION

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_SIM_SUBSCRIPTION
```

Flag indicating that this `PhoneAccount` represents a built-in PSTN SIM
subscription.


Only the Android framework can register a `PhoneAccount` having this capability.


See `https://developer.android.com/reference/android/telecom/PhoneAccount#getCapabilities()`

<br />

Constant Value:

4
(0x00000004)


### CAPABILITY_SUPPORTS_CALL_STREAMING

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_SUPPORTS_CALL_STREAMING
```

Flag indicating that this voip app `https://developer.android.com/reference/android/telecom/PhoneAccount` supports the call streaming session
to stream call audio to another remote device via streaming app.

<br />

**See also:**

- `https://developer.android.com/reference/android/telecom/PhoneAccount#getCapabilities()`

Constant Value:

524288
(0x00080000)


### CAPABILITY_SUPPORTS_TRANSACTIONAL_OPERATIONS

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_SUPPORTS_TRANSACTIONAL_OPERATIONS
```

Flag indicating that this `https://developer.android.com/reference/android/telecom/PhoneAccount` supports the transactional
`https://developer.android.com/reference/android/telecom/TelecomManager#addCall(android.telecom.CallAttributes,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.telecom.CallControl,android.telecom.CallException>,%20android.telecom.CallControlCallback,%20android.telecom.CallEventCallback)` API for adding calls.


An app that declares this capability is indicating its support for a newer,
more flexible call registration mechanism. When this capability is set on a
`https://developer.android.com/reference/android/telecom/PhoneAccount`, the Telecom framework will amend its capabilities to
include `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_SELF_MANAGED`. This allows the app to manage its
own call UI and lifecycle, while still integrating with the Android system for
audio routing and call management.


This capability should **only** be added if your application is using the
`https://developer.android.com/reference/android/telecom/TelecomManager#addCall(android.telecom.CallAttributes,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.telecom.CallControl,android.telecom.CallException>,%20android.telecom.CallControlCallback,%20android.telecom.CallEventCallback)` method to report new incoming and outgoing
calls. If your app uses the legacy methods `https://developer.android.com/reference/android/telecom/TelecomManager#addNewIncomingCall(android.telecom.PhoneAccountHandle,%20android.os.Bundle)` or
`https://developer.android.com/reference/android/telecom/TelecomManager#placeCall(android.net.Uri,%20android.os.Bundle)`, this capability **must not** be used.

<br />

**See also:**

- `https://developer.android.com/reference/android/telecom/TelecomManager#addCall(android.telecom.CallAttributes,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.telecom.CallControl,android.telecom.CallException>,%20android.telecom.CallControlCallback,%20android.telecom.CallEventCallback)`
- `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_SELF_MANAGED`
- `https://developer.android.com/reference/android/telecom/PhoneAccount#getCapabilities()`

Constant Value:

262144
(0x00040000)


### CAPABILITY_SUPPORTS_VIDEO_CALLING

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_SUPPORTS_VIDEO_CALLING
```

Flag indicating that this `https://developer.android.com/reference/android/telecom/PhoneAccount` supports video calling.
This is not an indication that the `https://developer.android.com/reference/android/telecom/PhoneAccount` is currently able to make a video
call, but rather that it has the ability to make video calls (but not necessarily at this
time).


Whether a `https://developer.android.com/reference/android/telecom/PhoneAccount` can make a video call is ultimately controlled by
`https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_VIDEO_CALLING`, which indicates whether the `https://developer.android.com/reference/android/telecom/PhoneAccount` is
currently capable of making a video call. Consider a case where, for example, a
`https://developer.android.com/reference/android/telecom/PhoneAccount` supports making video calls (e.g.
`https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_SUPPORTS_VIDEO_CALLING`), but a current lack of network connectivity
prevents video calls from being made (e.g. `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_VIDEO_CALLING`).


See `https://developer.android.com/reference/android/telecom/PhoneAccount#getCapabilities()`

<br />

Constant Value:

1024
(0x00000400)


### CAPABILITY_SUPPORTS_VOICE_CALLING_INDICATIONS

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_SUPPORTS_VOICE_CALLING_INDICATIONS
```

Flag indicating that this `https://developer.android.com/reference/android/telecom/PhoneAccount` provides SIM-based voice calls, potentially as
an over-the-top solution such as wi-fi calling.

Similar to `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_SUPPORTS_VIDEO_CALLING`, this capability indicates this
`https://developer.android.com/reference/android/telecom/PhoneAccount` has the ability to make voice calls (but not necessarily at this time).
Whether this `https://developer.android.com/reference/android/telecom/PhoneAccount` can make a voice call is ultimately controlled by `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_VOICE_CALLING_AVAILABLE`, which indicates whether this `https://developer.android.com/reference/android/telecom/PhoneAccount` is
currently capable of making a voice call. Consider a case where, for example, a `https://developer.android.com/reference/android/telecom/PhoneAccount` supports making voice calls (e.g. `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_SUPPORTS_VOICE_CALLING_INDICATIONS`), but a current lack of network connectivity
prevents voice calls from being made (e.g. `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_VOICE_CALLING_AVAILABLE`).

In order to declare this capability, this `https://developer.android.com/reference/android/telecom/PhoneAccount` must also declare `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_SIM_SUBSCRIPTION` or `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_CONNECTION_MANAGER` and satisfy the
associated requirements.

<br />

**See also:**

- `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_VOICE_CALLING_AVAILABLE`
- `https://developer.android.com/reference/android/telecom/PhoneAccount#getCapabilities()`

Constant Value:

65536
(0x00010000)


### CAPABILITY_VIDEO_CALLING

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_VIDEO_CALLING
```

Flag indicating that this `PhoneAccount` is currently able to place video calls.


See also `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_SUPPORTS_VIDEO_CALLING` which indicates whether the
`PhoneAccount` supports placing video calls.


See `https://developer.android.com/reference/android/telecom/PhoneAccount#getCapabilities()`

<br />

Constant Value:

8
(0x00000008)


### CAPABILITY_VIDEO_CALLING_RELIES_ON_PRESENCE

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_VIDEO_CALLING_RELIES_ON_PRESENCE
```

Flag indicating that for this `PhoneAccount`, the ability to make a video call to a
number relies on presence. Should only be set if the `PhoneAccount` also has
`https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_VIDEO_CALLING`.


Note: As of Android 12, using the
`https://developer.android.com/reference/android/provider/ContactsContract.DataColumns#CARRIER_PRESENCE_VT_CAPABLE` bit on the
`https://developer.android.com/reference/android/provider/ContactsContract.DataColumns#CARRIER_PRESENCE` column to indicate whether
a contact's phone number supports video calling has been deprecated and should only be used
on devices where `https://developer.android.com/reference/android/telephony/CarrierConfigManager#KEY_USE_RCS_PRESENCE_BOOL` is set. On newer
devices, applications must use `https://developer.android.com/reference/android/telephony/ims/RcsUceAdapter` instead to
determine whether or not a contact's phone number supports carrier video calling.


See `https://developer.android.com/reference/android/telecom/PhoneAccount#getCapabilities()`

<br />

Constant Value:

256
(0x00000100)


### CAPABILITY_VOICE_CALLING_AVAILABLE

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_VOICE_CALLING_AVAILABLE
```

Flag indicating that this `https://developer.android.com/reference/android/telecom/PhoneAccount` is *currently* able to place SIM-based
voice calls, similar to `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_VIDEO_CALLING`.

See also `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_SUPPORTS_VOICE_CALLING_INDICATIONS`, which indicates whether
the `PhoneAccount` supports placing SIM-based voice calls or not.

In order to declare this capability, this `https://developer.android.com/reference/android/telecom/PhoneAccount` must also declare `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_SIM_SUBSCRIPTION` or `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_CONNECTION_MANAGER` and satisfy the
associated requirements.

<br />

**See also:**

- `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_SUPPORTS_VOICE_CALLING_INDICATIONS`
- `https://developer.android.com/reference/android/telecom/PhoneAccount#getCapabilities()`

Constant Value:

131072
(0x00020000)


### EXTRA_ADD_SELF_MANAGED_CALLS_TO_INCALLSERVICE

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_ADD_SELF_MANAGED_CALLS_TO_INCALLSERVICE
```

Boolean `https://developer.android.com/reference/android/telecom/PhoneAccount` extras key (see `https://developer.android.com/reference/android/telecom/PhoneAccount#getExtras()`) which
indicates whether a Self-managed `https://developer.android.com/reference/android/telecom/PhoneAccount` want to expose its calls to all
`https://developer.android.com/reference/android/telecom/InCallService` which declares the metadata
`https://developer.android.com/reference/android/telecom/TelecomManager#METADATA_INCLUDE_SELF_MANAGED_CALLS`.

<br />

Constant Value:

"android.telecom.extra.ADD_SELF_MANAGED_CALLS_TO_INCALLSERVICE"


### EXTRA_ALWAYS_USE_VOIP_AUDIO_MODE

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_ALWAYS_USE_VOIP_AUDIO_MODE
```

Boolean `https://developer.android.com/reference/android/telecom/PhoneAccount` extras key (see `https://developer.android.com/reference/android/telecom/PhoneAccount#getExtras()`) which
indicates that all calls from this `https://developer.android.com/reference/android/telecom/PhoneAccount` should be treated as VoIP calls
rather than cellular calls by the Telecom audio handling logic.

<br />

Constant Value:

"android.telecom.extra.ALWAYS_USE_VOIP_AUDIO_MODE"


### EXTRA_CALL_SUBJECT_CHARACTER_ENCODING

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_CALL_SUBJECT_CHARACTER_ENCODING
```

`https://developer.android.com/reference/android/telecom/PhoneAccount` extras key (see `https://developer.android.com/reference/android/telecom/PhoneAccount#getExtras()`) which determines the
character encoding to be used when determining the length of messages.
The user interface can use this when determining the number of characters the user may type
in a call subject. If empty-string, the call subject message size limit will be enforced on
a 1:1 basis. That is, each character will count towards the messages size limit as a single
character. If a character encoding is specified, the message size limit will be based on the
number of bytes in the message per the specified encoding. See
`https://developer.android.com/reference/android/telecom/PhoneAccount#EXTRA_CALL_SUBJECT_MAX_LENGTH` for more information on the call subject maximum
length.

<br />

Constant Value:

"android.telecom.extra.CALL_SUBJECT_CHARACTER_ENCODING"


### EXTRA_CALL_SUBJECT_MAX_LENGTH

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_CALL_SUBJECT_MAX_LENGTH
```

`https://developer.android.com/reference/android/telecom/PhoneAccount` extras key (see `https://developer.android.com/reference/android/telecom/PhoneAccount#getExtras()`) which determines the
maximum permitted length of a call subject specified via the
`https://developer.android.com/reference/android/telecom/TelecomManager#EXTRA_CALL_SUBJECT` extra on an
`https://developer.android.com/reference/android/content/Intent#ACTION_CALL` intent. Ultimately a `https://developer.android.com/reference/android/telecom/ConnectionService` is
responsible for enforcing the maximum call subject length when sending the message, however
this extra is provided so that the user interface can proactively limit the length of the
call subject as the user types it.

<br />

Constant Value:

"android.telecom.extra.CALL_SUBJECT_MAX_LENGTH"


### EXTRA_LOG_SELF_MANAGED_CALLS

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
36.1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_LOG_SELF_MANAGED_CALLS
```


**This constant was deprecated
in API level 36.1.**   

Register `https://developer.android.com/reference/android/telecom/TelecomManager#ACTION_CALL_BACK` instead.

Boolean `https://developer.android.com/reference/android/telecom/PhoneAccount` extras key (see `https://developer.android.com/reference/android/telecom/PhoneAccount#getExtras()`) which
indicates whether a Self-Managed `https://developer.android.com/reference/android/telecom/PhoneAccount` should log its calls to the call log.
Self-Managed `https://developer.android.com/reference/android/telecom/PhoneAccount`s are responsible for their own notifications, so the system
will not create a notification when a missed call is logged.


By default, Self-Managed `https://developer.android.com/reference/android/telecom/PhoneAccount`s do not log their calls to the call log.
Setting this extra to `true` provides a means for them to log their calls.


Note: Only calls where the `https://developer.android.com/reference/android/telecom/Call.Details#getHandle()` `https://developer.android.com/reference/android/net/Uri#getScheme()` is
`https://developer.android.com/reference/android/telecom/PhoneAccount#SCHEME_SIP` or `https://developer.android.com/reference/android/telecom/PhoneAccount#SCHEME_TEL` will be logged at the current time.

<br />

Constant Value:

"android.telecom.extra.LOG_SELF_MANAGED_CALLS"


### EXTRA_SUPPORTS_HANDOVER_FROM

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_SUPPORTS_HANDOVER_FROM
```

Boolean `https://developer.android.com/reference/android/telecom/PhoneAccount` extras key (see `https://developer.android.com/reference/android/telecom/PhoneAccount#getExtras()`) which
indicates whether this `https://developer.android.com/reference/android/telecom/PhoneAccount` is capable of supporting a request to handover a
connection from this `https://developer.android.com/reference/android/telecom/PhoneAccount` to another `https://developer.android.com/reference/android/telecom/PhoneAccount`.
(see `android.telecom.Call#handoverTo()`) which specifies
`https://developer.android.com/reference/android/telecom/PhoneAccount#EXTRA_SUPPORTS_HANDOVER_TO`.


A handover request is initiated by the user from the default dialer app to indicate a desire
to handover a call from one `https://developer.android.com/reference/android/telecom/PhoneAccount`/`https://developer.android.com/reference/android/telecom/ConnectionService` to another.

<br />

Constant Value:

"android.telecom.extra.SUPPORTS_HANDOVER_FROM"


### EXTRA_SUPPORTS_HANDOVER_TO

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_SUPPORTS_HANDOVER_TO
```

Boolean `https://developer.android.com/reference/android/telecom/PhoneAccount` extras key (see `https://developer.android.com/reference/android/telecom/PhoneAccount#getExtras()`) which
indicates whether this `https://developer.android.com/reference/android/telecom/PhoneAccount` is capable of supporting a request to handover a
connection (see `android.telecom.Call#handoverTo()`) to this `https://developer.android.com/reference/android/telecom/PhoneAccount` from
a `https://developer.android.com/reference/android/telecom/PhoneAccount` specifying `https://developer.android.com/reference/android/telecom/PhoneAccount#EXTRA_SUPPORTS_HANDOVER_FROM`.


A handover request is initiated by the user from the default dialer app to indicate a desire
to handover a call from one `https://developer.android.com/reference/android/telecom/PhoneAccount`/`https://developer.android.com/reference/android/telecom/ConnectionService` to another.

<br />

Constant Value:

"android.telecom.extra.SUPPORTS_HANDOVER_TO"


### LOW_BATTERY_ALERT_DISABLED

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int LOW_BATTERY_ALERT_DISABLED
```

Default value indicating that the low battery alert feature is disabled.

<br />

Constant Value:

-1
(0xffffffff)


### NO_HIGHLIGHT_COLOR

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NO_HIGHLIGHT_COLOR
```

Indicating no hightlight color is set.

<br />

Constant Value:

0
(0x00000000)


### NO_RESOURCE_ID

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NO_RESOURCE_ID
```

Indicating no resource ID is set.

<br />

Constant Value:

-1
(0xffffffff)


### SCHEME_SIP

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String SCHEME_SIP
```

URI scheme for SIP URIs.

<br />

Constant Value:

"sip"


### SCHEME_TEL

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String SCHEME_TEL
```

URI scheme for telephone number URIs.

<br />

Constant Value:

"tel"


### SCHEME_VOICEMAIL

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String SCHEME_VOICEMAIL
```

URI scheme for voicemail URIs.

<br />

Constant Value:

"voicemail"


## Fields

### CREATOR

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Creator<PhoneAccount> CREATOR
```

<br />

<br />

## Public methods

### builder

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static PhoneAccount.Builder builder (PhoneAccountHandle accountHandle, 
                CharSequence label)
```

<br />

<br />

| Parameters ||
|---|---|
| `accountHandle` | `PhoneAccountHandle` <br /> |
| `label` | `CharSequence` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telecom/PhoneAccount.Builder` | <br /> |

### describeContents

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int describeContents ()
```

Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`,
the return value of this method must include the
`https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` bit.

<br />

| Returns ||
|---|---|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or - `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` |

### equals

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean equals (Object o)
```

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


The `equals` method implements an equivalence relation
on non-null object references:

- It is *reflexive*: for any non-null reference value `x`, `x.equals(x)` should return `true`.
- It is *symmetric*: for any non-null reference values `x` and `y`, `x.equals(y)` should return `true` if and only if `y.equals(x)` returns `true`.
- It is *transitive*: for any non-null reference values `x`, `y`, and `z`, if `x.equals(y)` returns `true` and `y.equals(z)` returns `true`, then `x.equals(z)` should return `true`.
- It is *consistent*: for any non-null reference values `x` and `y`, multiple invocations of `x.equals(y)` consistently return `true` or consistently return `false`, provided no information used in `equals` comparisons on the objects is modified.
- For any non-null reference value `x`, `x.equals(null)` should return `false`.


An equivalence relation partitions the elements it operates on
into *equivalence classes*; all the members of an
equivalence class are equal to each other. Members of an
equivalence class are substitutable for each other, at least
for some purposes.

<br />

| Parameters ||
|---|---|
| `o` | `Object`: the reference object with which to compare. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if this object is the same as the obj argument; `false` otherwise. <br /> |

### getAccountHandle

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public PhoneAccountHandle getAccountHandle ()
```

The unique identifier of this `PhoneAccount`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telecom/PhoneAccountHandle` | A `PhoneAccountHandle`. <br /> |

### getAddress

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Uri getAddress ()
```

The address (e.g., a phone number) associated with this `PhoneAccount`. This
represents the destination from which outgoing calls using this `PhoneAccount`
will appear to come, if applicable, and the destination to which incoming calls using this
`PhoneAccount` may be addressed.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/Uri` | A address expressed as a `Uri`, for example, a phone number. <br /> |

### getCapabilities

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getCapabilities ()
```

The capabilities of this `PhoneAccount`.

<br />

| Returns ||
|---|---|
| `int` | A bit field of flags describing this `PhoneAccount`'s capabilities. <br /> |

### getExtras

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Bundle getExtras ()
```

The extras associated with this `PhoneAccount`.


A `https://developer.android.com/reference/android/telecom/ConnectionService` may provide implementation specific information about the
`https://developer.android.com/reference/android/telecom/PhoneAccount` via the extras.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/Bundle` | The extras. <br /> |

### getHighlightColor

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getHighlightColor ()
```

A highlight color to use in displaying information about this `PhoneAccount`.

<br />

| Returns ||
|---|---|
| `int` | A hexadecimal color value. <br /> |

### getIcon

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Icon getIcon ()
```

The icon to represent this `PhoneAccount`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Icon` | The icon. <br /> |

### getLabel

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CharSequence getLabel ()
```

A short label describing a `PhoneAccount`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | A label for this `PhoneAccount`. <br /> |

### getShortDescription

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CharSequence getShortDescription ()
```

A short paragraph describing this `PhoneAccount`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | A description for this `PhoneAccount`. <br /> |

### getSimultaneousCallingRestriction

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Set<PhoneAccountHandle> getSimultaneousCallingRestriction ()
```

If a restriction is set (see `https://developer.android.com/reference/android/telecom/PhoneAccount#hasSimultaneousCallingRestriction()`), this method
returns the Set of `https://developer.android.com/reference/android/telecom/PhoneAccountHandle`s that are allowed to support calls
simultaneously with this `https://developer.android.com/reference/android/telecom/PhoneAccount`.


If this `https://developer.android.com/reference/android/telecom/PhoneAccount` is busy with one or more ongoing calls, a restriction is set on
this PhoneAccount (see `https://developer.android.com/reference/android/telecom/PhoneAccount#hasSimultaneousCallingRestriction()` to check), and a new
incoming or outgoing call is received or placed on a PhoneAccount that is not in this Set,
Telecom will reject or cancel the pending call in favor of keeping the ongoing call alive.


Note: Simultaneous calling restrictions can only be placed on `https://developer.android.com/reference/android/telecom/PhoneAccount`s that
were registered by the same application. Simultaneous calling across applications is
always possible as long as the `https://developer.android.com/reference/android/telecom/Connection` supports hold.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/android/telecom/PhoneAccountHandle>` | the Set of `https://developer.android.com/reference/android/telecom/PhoneAccountHandle`s that this `https://developer.android.com/reference/android/telecom/PhoneAccount` supports simultaneous calls with. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException` | If there is no restriction set on this `https://developer.android.com/reference/android/telecom/PhoneAccount` and this method is called. Whether or not there is a restriction can be checked using `https://developer.android.com/reference/android/telecom/PhoneAccount#hasSimultaneousCallingRestriction()`. |

### getSubscriptionAddress

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Uri getSubscriptionAddress ()
```

The raw callback number used for this `PhoneAccount`, as distinct from
`https://developer.android.com/reference/android/telecom/PhoneAccount#getAddress()`. For the majority of `PhoneAccount`s this should be registered
as `null`. It is used by the system for SIM-based `PhoneAccount` registration
where `https://developer.android.com/reference/android/telephony/TelephonyManager#setLine1NumberForDisplay(java.lang.String,%20java.lang.String)`
has been used to alter the callback number.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/Uri` | The subscription number, suitable for display to the user. <br /> |

### getSupportedUriSchemes

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public List<String> getSupportedUriSchemes ()
```

The URI schemes supported by this `PhoneAccount`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/java/lang/String>` | The URI schemes. <br /> |

### hasCapabilities

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean hasCapabilities (int capability)
```

Determines if this `PhoneAccount` has a capabilities specified by the passed in
bit mask.

<br />

| Parameters ||
|---|---|
| `capability` | `int`: The capabilities to check. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if the phone account has the capability. <br /> |

### hasSimultaneousCallingRestriction

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean hasSimultaneousCallingRestriction ()
```

Whether or not this `https://developer.android.com/reference/android/telecom/PhoneAccount` contains a simultaneous calling restriction on it.

<br />

| Returns ||
|---|---|
| `boolean` | `true` if this PhoneAccount contains a simultaneous calling restriction, `false` if it does not. Use `https://developer.android.com/reference/android/telecom/PhoneAccount#getSimultaneousCallingRestriction()` to query which other `https://developer.android.com/reference/android/telecom/PhoneAccount`s support simultaneous calling with this one. <br /> |

**See also:**

- `https://developer.android.com/reference/android/telecom/PhoneAccount#getSimultaneousCallingRestriction()`

### hashCode

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int hashCode ()
```

Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
`https://developer.android.com/reference/java/util/HashMap`.


The general contract of `hashCode` is:

- Whenever it is invoked on the same object more than once during an execution of a Java application, the `hashCode` method must consistently return the same integer, provided no information used in `equals` comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
- If two objects are equal according to the `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce the same integer result.
- It is *not* required that if two objects are unequal according to the `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.

<br />

<br />

| Returns ||
|---|---|
| `int` | a hash code value for this object. <br /> |

### isEnabled

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isEnabled ()
```

Indicates whether the user has enabled this `PhoneAccount` or not. This value is only
populated for `PhoneAccount`s returned by `https://developer.android.com/reference/android/telecom/TelecomManager#getPhoneAccount(android.telecom.PhoneAccountHandle)`.

<br />

| Returns ||
|---|---|
| `boolean` | `true` if the account is enabled by the user, `false` otherwise. <br /> |

### supportsUriScheme

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean supportsUriScheme (String uriScheme)
```

Determines if the `https://developer.android.com/reference/android/telecom/PhoneAccount` supports calls to/from addresses with a specified URI
scheme.

<br />

| Parameters ||
|---|---|
| `uriScheme` | `String`: The URI scheme to check. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if the `PhoneAccount` supports calls to/from addresses with the specified URI scheme. <br /> |

### toBuilder

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public PhoneAccount.Builder toBuilder ()
```

Returns a builder initialized with the current `https://developer.android.com/reference/android/telecom/PhoneAccount` instance.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telecom/PhoneAccount.Builder` | The builder. <br /> |

### toString

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |

### writeToParcel

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void writeToParcel (Parcel out, 
                int flags)
```

Flatten this object in to a Parcel.

<br />

| Parameters ||
|---|---|
| `out` | `Parcel`: The Parcel in which the object should be written. This value cannot be `null`. <br /> |
| `flags` | `int`: Additional flags about how the object should be written. May be 0 or `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` |