# CallAttributesCompat

Artifact: [androidx.core:core-telecom](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/telecom/CallAttributesCompat.kt+class:androidx.core.telecom.CallAttributesCompat) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

*** ** * ** ***


```
class CallAttributesCompat
```

<br />

*** ** * ** ***

CallAttributes represents a set of properties that define a new Call. Applications should build an instance of this class and use `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallsManager#addCall(androidx.core.telecom.CallAttributesCompat,kotlin.coroutines.SuspendFunction1,kotlin.coroutines.SuspendFunction1,kotlin.coroutines.SuspendFunction0,kotlin.coroutines.SuspendFunction0,kotlin.Function1)` to start a new call with Telecom.

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallAttributesCompat#CALL_TYPE_AUDIO_CALL() = 1` Used when answering or dialing a call to indicate that the call does not have a video component |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallAttributesCompat#CALL_TYPE_VIDEO_CALL() = 2` Indicates video transmission is supported |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallAttributesCompat#DIRECTION_INCOMING() = 1` Indicates that the call is an incoming call. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallAttributesCompat#DIRECTION_OUTGOING() = 2` Indicates that the call is an outgoing call. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallAttributesCompat#SUPPORTS_SET_INACTIVE()` This call being created can be set to inactive (traditionally referred to as hold). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallAttributesCompat#SUPPORTS_STREAM()` This call can be streamed from a root device to another device to continue the call without completely transferring it. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallAttributesCompat#SUPPORTS_TRANSFER()` This call can be completely transferred from one endpoint to another. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallAttributesCompat#CallAttributesCompat(kotlin.CharSequence,android.net.Uri,kotlin.Int,kotlin.Int,kotlin.Int,androidx.core.telecom.CallEndpointCompat,kotlin.Boolean)( displayName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html, address: https://developer.android.com/reference/android/net/Uri.html, direction: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, callType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, callCapabilities: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, preferredStartingCallEndpoint: https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat?, isLogExcluded: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html? )` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallAttributesCompat#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallAttributesCompat#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallAttributesCompat#toString()()` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallAttributesCompat#address()` Address of the call. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallAttributesCompat#callCapabilities()` Allows a package to opt into capabilities on the telecom side, on a per-call basis |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallAttributesCompat#callType()` Information related to data being transmitted (voice, video, etc. ) |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallAttributesCompat#direction()` The direction (Outgoing/Incoming) of the new Call |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallAttributesCompat#displayName()` Display name of the person on the other end of the call |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html?` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallAttributesCompat#isLogExcluded()` Whether this call should be excluded from the call log. |
| `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat?` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallAttributesCompat#preferredStartingCallEndpoint()` allows clients to specify a `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat` to start a new call on. |

## Constants

### CALL_TYPE_AUDIO_CALL

```
const val CALL_TYPE_AUDIO_CALL = 1: Int
```

Used when answering or dialing a call to indicate that the call does not have a video component

### CALL_TYPE_VIDEO_CALL

```
const val CALL_TYPE_VIDEO_CALL = 2: Int
```

Indicates video transmission is supported

### DIRECTION_INCOMING

```
const val DIRECTION_INCOMING = 1: Int
```

Indicates that the call is an incoming call.

### DIRECTION_OUTGOING

```
const val DIRECTION_OUTGOING = 2: Int
```

Indicates that the call is an outgoing call.

### SUPPORTS_SET_INACTIVE

```
const val SUPPORTS_SET_INACTIVE: Int
```

This call being created can be set to inactive (traditionally referred to as hold). This means that once a new call goes active, if the active call needs to be held in order to place or receive an incoming call, the active call will be placed on hold. otherwise, the active call may be disconnected.

### SUPPORTS_STREAM

```
const val SUPPORTS_STREAM: Int
```

This call can be streamed from a root device to another device to continue the call without completely transferring it. The call continues to take place on the source device, however media and control are streamed to another device.

### SUPPORTS_TRANSFER

```
const val SUPPORTS_TRANSFER: Int
```

This call can be completely transferred from one endpoint to another.

## Public constructors

### CallAttributesCompat

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
CallAttributesCompat(
    displayName: CharSequence,
    address: Uri,
    direction: Int,
    callType: Int = CALL_TYPE_AUDIO_CALL,
    callCapabilities: Int = SUPPORTS_SET_INACTIVE,
    preferredStartingCallEndpoint: CallEndpointCompat? = null,
    isLogExcluded: Boolean? = null
)
```

| Parameters |
|---|---|
| `displayName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` | Display name of the person on the other end of the call |
| `address: https://developer.android.com/reference/android/net/Uri.html` | Address of the call. Note, this can be extended to a meeting link or a custom scheme. On sdks 26 \& 27, the address should start with the "sip:" prefix (e.g Uri.parse("sip:")), otherwise the address will be replaced with "sip:" + packageName. |
| `direction: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The direction (Outgoing/Incoming) of the new Call Value is one of the following: - `1` - `2` <br /> |
| `callType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = CALL_TYPE_AUDIO_CALL` | Information related to data being transmitted (voice, video, etc. ) Value is one of the following: - `1` - `2` <br /> |
| `callCapabilities: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = SUPPORTS_SET_INACTIVE` | Allows a package to opt into capabilities on the telecom side, on a per-call basis Value is either `0` or a combination of the following: - `2` - `4` - `8` <br /> |
| `preferredStartingCallEndpoint: https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat? = null` | allows clients to specify a `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat` to start a new call on. The `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallAttributesCompat#preferredStartingCallEndpoint()` should be a value returned from `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallsManager#getAvailableStartingCallEndpoints()`. Once the call is started, Core-Telecom will switch to the `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallAttributesCompat#preferredStartingCallEndpoint()` before running the `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallControlScope`. |
| `isLogExcluded: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html? = null` | Whether this call should be excluded from the call log. This is only applicable on sdks 36.1+. Pass null if the default platform behavior is desired or when running on older versions. |

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

### toString

```
open fun toString(): String
```

## Public properties

### address

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

```
val address: Uri
```

Address of the call. Note, this can be extended to a meeting link or a custom scheme. On sdks 26 \& 27, the address should start with the "sip:" prefix (e.g Uri.parse("sip:")), otherwise the address will be replaced with "sip:" + packageName.

### callCapabilities

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

```
val callCapabilities: Int
```

Allows a package to opt into capabilities on the telecom side, on a per-call basis

Value is either `0` or a combination of the following:

- `2`
- `4`
- `8`

<br />

### callType

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

```
val callType: Int
```

Information related to data being transmitted (voice, video, etc. )

Value is one of the following:

- `1`
- `2`

<br />

### direction

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

```
val direction: Int
```

The direction (Outgoing/Incoming) of the new Call

Value is one of the following:

- `1`
- `2`

<br />

### displayName

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

```
val displayName: CharSequence
```

Display name of the person on the other end of the call

### isLogExcluded

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
val isLogExcluded: Boolean?
```

Whether this call should be excluded from the call log. This is only applicable on sdks 36.1+. Pass null if the default platform behavior is desired or when running on older versions.

### preferredStartingCallEndpoint

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

```
val preferredStartingCallEndpoint: CallEndpointCompat?
```

allows clients to specify a `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat` to start a new call on. The `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallAttributesCompat#preferredStartingCallEndpoint()` should be a value returned from `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallsManager#getAvailableStartingCallEndpoints()`. Once the call is started, Core-Telecom will switch to the `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallAttributesCompat#preferredStartingCallEndpoint()` before running the `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallControlScope`.