Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/telecom/CallAttributes.Builder#pubctors) \| [Methods](https://developer.android.com/reference/android/telecom/CallAttributes.Builder#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/telecom/CallAttributes.Builder#inhmethods)

# CallAttributes.Builder

*** ** * ** ***


`
public
static
final

class
CallAttributes.Builder
`


`

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


`

`


`

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

<br />

*** ** * ** ***

Build an instance of `https://developer.android.com/reference/android/telecom/CallAttributes`. In order to build a valid instance, a
`https://developer.android.com/reference/android/telecom/PhoneAccountHandle`, call direction, display name, and `https://developer.android.com/reference/android/net/Uri` address
are required.


Note: Pass in the same `https://developer.android.com/reference/android/telecom/PhoneAccountHandle` that was used to register a
`https://developer.android.com/reference/android/telecom/PhoneAccount` with Telecom. see `https://developer.android.com/reference/android/telecom/TelecomManager#registerPhoneAccount(android.telecom.PhoneAccount)`

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/telecom/CallAttributes.Builder#Builder(android.telecom.PhoneAccountHandle,%20int,%20java.lang.CharSequence,%20android.net.Uri)(https://developer.android.com/reference/android/telecom/PhoneAccountHandle phoneAccountHandle, int callDirection, https://developer.android.com/reference/java/lang/CharSequence displayName, https://developer.android.com/reference/android/net/Uri address) ` Constructor for the CallAttributes.Builder class |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/telecom/CallAttributes` | ` https://developer.android.com/reference/android/telecom/CallAttributes.Builder#build()() ` Build an instance of `https://developer.android.com/reference/android/telecom/CallAttributes` based on the last values passed to the setters or default values. |
| ` https://developer.android.com/reference/android/telecom/CallAttributes.Builder` | ` https://developer.android.com/reference/android/telecom/CallAttributes.Builder#setCallCapabilities(int)(int callCapabilities) ` Sets the capabilities of this call. |
| ` https://developer.android.com/reference/android/telecom/CallAttributes.Builder` | ` https://developer.android.com/reference/android/telecom/CallAttributes.Builder#setCallType(int)(int callType) ` Sets the type of call; uses to indicate if a call is a video call or audio call. |
| ` https://developer.android.com/reference/android/telecom/CallAttributes.Builder` | ` https://developer.android.com/reference/android/telecom/CallAttributes.Builder#setContactUri(android.net.Uri)(https://developer.android.com/reference/android/net/Uri contactUri) ` Sets the contact directory URI for the VoIP app. |
| ` https://developer.android.com/reference/android/telecom/CallAttributes.Builder` | ` https://developer.android.com/reference/android/telecom/CallAttributes.Builder#setIsGroupCall(boolean)(boolean isGroupCall) ` Sets whether or not this call should be considered a group call. |
| ` https://developer.android.com/reference/android/telecom/CallAttributes.Builder` | ` https://developer.android.com/reference/android/telecom/CallAttributes.Builder#setLogExcluded(boolean)(boolean isExcluded) ` Sets the attribute to exclude the call from system call logs. |

| ### 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*. | ||

## Public constructors

### Builder

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

```
public Builder (PhoneAccountHandle phoneAccountHandle, 
                int callDirection, 
                CharSequence displayName, 
                Uri address)
```

Constructor for the CallAttributes.Builder class

<br />

| Parameters ||
|---|---|
| `phoneAccountHandle` | `PhoneAccountHandle`: that belongs to package registered with Telecom. This value cannot be `null`. <br /> |
| `callDirection` | `int`: of the new call that will be added to Telecom. Value is one of the following: - `https://developer.android.com/reference/android/telecom/CallAttributes#DIRECTION_INCOMING` - `https://developer.android.com/reference/android/telecom/CallAttributes#DIRECTION_OUTGOING` |
| `displayName` | `CharSequence`: of the caller for incoming calls or initiating user for outgoing calls. This value cannot be `null`. <br /> |
| `address` | `Uri`: of the caller for incoming calls or destination for outgoing calls. This value cannot be `null`. <br /> |

## Public methods

### build

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

```
public CallAttributes build ()
```

Build an instance of `https://developer.android.com/reference/android/telecom/CallAttributes` based on the last values passed to the
setters or default values.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telecom/CallAttributes` | an instance of `https://developer.android.com/reference/android/telecom/CallAttributes` This value cannot be `null`. <br /> |

### setCallCapabilities

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

```
public CallAttributes.Builder setCallCapabilities (int callCapabilities)
```

Sets the capabilities of this call. Use this to indicate whether your app supports
holding, streaming and call transfers.

<br />

| Parameters ||
|---|---|
| `callCapabilities` | `int`: Bitmask of call capabilities. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/telecom/CallAttributes#SUPPORTS_SET_INACTIVE` - `https://developer.android.com/reference/android/telecom/CallAttributes#SUPPORTS_STREAM` - `https://developer.android.com/reference/android/telecom/CallAttributes#SUPPORTS_TRANSFER` - `https://developer.android.com/reference/android/telecom/CallAttributes#SUPPORTS_VIDEO_CALLING` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telecom/CallAttributes.Builder` | Builder. This value cannot be `null`. <br /> |

### setCallType

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

```
public CallAttributes.Builder setCallType (int callType)
```

Sets the type of call; uses to indicate if a call is a video call or audio call.

<br />

| Parameters ||
|---|---|
| `callType` | `int`: The call type. Value is one of the following: - `https://developer.android.com/reference/android/telecom/CallAttributes#AUDIO_CALL` - `https://developer.android.com/reference/android/telecom/CallAttributes#VIDEO_CALL` - `https://developer.android.com/reference/android/telecom/CallAttributes#MESSAGING` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telecom/CallAttributes.Builder` | Builder. This value cannot be `null`. <br /> |

### setContactUri

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

```
public CallAttributes.Builder setContactUri (Uri contactUri)
```

Sets the contact directory URI for the VoIP app. This must be a valid URI pointing to the
VoIP contact directory or a valid CP2 contact.

<br />

| Parameters ||
|---|---|
| `contactUri` | `Uri`: The contact URI pointing to the VoIP contact directory or CP2 contact. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telecom/CallAttributes.Builder` | Builder. This value cannot be `null`. <br /> |

### setIsGroupCall

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

```
public CallAttributes.Builder setIsGroupCall (boolean isGroupCall)
```

Sets whether or not this call should be considered a group call.

<br />

| Parameters ||
|---|---|
| `isGroupCall` | `boolean`: whether the call is a group call. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telecom/CallAttributes.Builder` | Builder. This value cannot be `null`. <br /> |

### setLogExcluded

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

```
public CallAttributes.Builder setLogExcluded (boolean isExcluded)
```

Sets the attribute to exclude the call from system call logs.

<br />

| Parameters ||
|---|---|
| `isExcluded` | `boolean`: whether the call should be excluded. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telecom/CallAttributes.Builder` | Builder. This value cannot be `null`. <br /> |