# CallEndpointCompat

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/CallEndpointCompat.kt+class:androidx.core.telecom.CallEndpointCompat) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

*** ** * ** ***


```
@RequiresApi(value = 26)
class CallEndpointCompat : Comparable<CallEndpointCompat>
```

<br />

*** ** * ** ***

Constructor for a `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat` object.

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#TYPE_BLUETOOTH() = 2` Indicates that the type of endpoint through which call media flows is a Bluetooth. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#TYPE_EARPIECE() = 1` Indicates that the type of endpoint through which call media flows is an earpiece. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#TYPE_SPEAKER() = 4` Indicates that the type of endpoint through which call media flows is a speakerphone. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#TYPE_STREAMING() = 5` Indicates that the type of endpoint through which call media flows is an external. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#TYPE_UNKNOWN()` Indicates that the type of endpoint through which call media flows is unknown type. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#TYPE_WIRED_HEADSET() = 3` Indicates that the type of endpoint through which call media flows is a wired headset. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#CallEndpointCompat(kotlin.CharSequence,kotlin.Int,android.os.ParcelUuid)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html, type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, identifier: https://developer.android.com/reference/android/os/ParcelUuid.html)` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#compareTo(androidx.core.telecom.CallEndpointCompat)(other: https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat)` Compares this `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat` to the other `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat` for order. |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#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/CallEndpointCompat#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#toString()()` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/android/os/ParcelUuid.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#identifier()` A unique identifier for this endpoint on the device |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#name()` Human-readable name associated with the endpoint |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#type()` The type of endpoint through which call media being routed Allowed values: `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#TYPE_EARPIECE()` , `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#TYPE_BLUETOOTH()` , `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#TYPE_WIRED_HEADSET()` , `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#TYPE_SPEAKER()` , `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#TYPE_STREAMING()` , `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#TYPE_UNKNOWN()` |

## Constants

### TYPE_BLUETOOTH

```
const val TYPE_BLUETOOTH = 2: Int
```

Indicates that the type of endpoint through which call media flows is a Bluetooth.

### TYPE_EARPIECE

```
const val TYPE_EARPIECE = 1: Int
```

Indicates that the type of endpoint through which call media flows is an earpiece.

### TYPE_SPEAKER

```
const val TYPE_SPEAKER = 4: Int
```

Indicates that the type of endpoint through which call media flows is a speakerphone.

### TYPE_STREAMING

```
const val TYPE_STREAMING = 5: Int
```

Indicates that the type of endpoint through which call media flows is an external.

### TYPE_UNKNOWN

```
const val TYPE_UNKNOWN: Int
```

Indicates that the type of endpoint through which call media flows is unknown type.

### TYPE_WIRED_HEADSET

```
const val TYPE_WIRED_HEADSET = 3: Int
```

Indicates that the type of endpoint through which call media flows is a wired headset.

## Public constructors

### CallEndpointCompat

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

```
CallEndpointCompat(name: CharSequence, type: Int, identifier: ParcelUuid)
```

| Parameters |
|---|---|
| `name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` | Human-readable name associated with the endpoint |
| `type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The type of endpoint through which call media being routed Allowed values: `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#TYPE_EARPIECE()` , `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#TYPE_BLUETOOTH()` , `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#TYPE_WIRED_HEADSET()` , `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#TYPE_SPEAKER()` , `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#TYPE_STREAMING()` , `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#TYPE_UNKNOWN()` |
| `identifier: https://developer.android.com/reference/android/os/ParcelUuid.html` | A unique identifier for this endpoint on the device |

## Public functions

### compareTo

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

```
open operator fun compareTo(other: CallEndpointCompat): Int
```

Compares this `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat` to the other `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat` for order. Returns a positive number if this type rank is greater than the other value. Returns a negative number if this type rank is less than the other value. Sort the CallEndpoint by type. Ranking them by:

1. TYPE_WIRED_HEADSET

2. TYPE_BLUETOOTH

3. TYPE_SPEAKER

4. TYPE_EARPIECE

5. TYPE_STREAMING

6. TYPE_UNKNOWN If two endpoints have the same type, the name is compared to determine the value.

### equals

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

### hashCode

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

### toString

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

## Public properties

### identifier

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

```
val identifier: ParcelUuid
```

A unique identifier for this endpoint on the device

### name

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

```
val name: CharSequence
```

Human-readable name associated with the endpoint

### type

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

```
val type: Int
```

The type of endpoint through which call media being routed Allowed values: `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#TYPE_EARPIECE()` , `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#TYPE_BLUETOOTH()` , `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#TYPE_WIRED_HEADSET()` , `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#TYPE_SPEAKER()` , `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#TYPE_STREAMING()` , `https://developer.android.com/reference/kotlin/androidx/core/telecom/CallEndpointCompat#TYPE_UNKNOWN()`