# 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)
public final class CallEndpointCompat implements Comparable<@NonNull CallEndpointCompat>
```

<br />

*** ** * ** ***

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

## Summary

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat#TYPE_BLUETOOTH() = 2` Indicates that the type of endpoint through which call media flows is a Bluetooth. |
| `static final int` | `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat#TYPE_EARPIECE() = 1` Indicates that the type of endpoint through which call media flows is an earpiece. |
| `static final int` | `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat#TYPE_SPEAKER() = 4` Indicates that the type of endpoint through which call media flows is a speakerphone. |
| `static final int` | `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat#TYPE_STREAMING() = 5` Indicates that the type of endpoint through which call media flows is an external. |
| `static final int` | `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat#TYPE_UNKNOWN()` Indicates that the type of endpoint through which call media flows is unknown type. |
| `static final int` | `https://developer.android.com/reference/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/androidx/core/telecom/CallEndpointCompat#CallEndpointCompat(kotlin.CharSequence,kotlin.Int,android.os.ParcelUuid)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html name, int type, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/ParcelUuid.html identifier )` |

| ### Public methods |
|---|---|
| `int` | `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat#compareTo(androidx.core.telecom.CallEndpointCompat)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat other)` Compares this `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat` to the other `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat` for order. |
| `boolean` | `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/ParcelUuid.html` | `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat#getIdentifier()()` A unique identifier for this endpoint on the device |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html` | `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat#getName()()` Human-readable name associated with the endpoint |
| `final int` | `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat#getType()()` The type of endpoint through which call media being routed Allowed values: `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat#TYPE_EARPIECE()` , `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat#TYPE_BLUETOOTH()` , `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat#TYPE_WIRED_HEADSET()` , `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat#TYPE_SPEAKER()` , `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat#TYPE_STREAMING()` , `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat#TYPE_UNKNOWN()` |
| `int` | `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat#hashCode()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat#toString()()` |

## Constants

### TYPE_BLUETOOTH

```
public static final int TYPE_BLUETOOTH = 2
```

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

### TYPE_EARPIECE

```
public static final int TYPE_EARPIECE = 1
```

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

### TYPE_SPEAKER

```
public static final int TYPE_SPEAKER = 4
```

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

### TYPE_STREAMING

```
public static final int TYPE_STREAMING = 5
```

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

### TYPE_UNKNOWN

```
public static final int TYPE_UNKNOWN
```

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

### TYPE_WIRED_HEADSET

```
public static final int TYPE_WIRED_HEADSET = 3
```

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)

```
public CallEndpointCompat(
    @NonNull CharSequence name,
    int type,
    @NonNull ParcelUuid identifier
)
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html name` | Human-readable name associated with the endpoint |
| `int type` | The type of endpoint through which call media being routed Allowed values: `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat#TYPE_EARPIECE()` , `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat#TYPE_BLUETOOTH()` , `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat#TYPE_WIRED_HEADSET()` , `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat#TYPE_SPEAKER()` , `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat#TYPE_STREAMING()` , `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat#TYPE_UNKNOWN()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/ParcelUuid.html identifier` | A unique identifier for this endpoint on the device |

## Public methods

### compareTo

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

```
public int compareTo(@NonNull CallEndpointCompat other)
```

Compares this `https://developer.android.com/reference/androidx/core/telecom/CallEndpointCompat` to the other `https://developer.android.com/reference/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

```
public boolean equals(Object other)
```

### getIdentifier

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

```
public final @NonNull ParcelUuid getIdentifier()
```

A unique identifier for this endpoint on the device

### getName

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

```
public final @NonNull CharSequence getName()
```

Human-readable name associated with the endpoint

### getType

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

```
public final int getType()
```

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

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```