CallEndpointCompat
@RequiresApi(value = 26)
public final class CallEndpointCompat implements Comparable
Constructor for a CallEndpointCompat object.
Summary
Constants |
|
|---|---|
static final int |
TYPE_BLUETOOTH = 2Indicates that the type of endpoint through which call media flows is a Bluetooth. |
static final int |
TYPE_EARPIECE = 1Indicates that the type of endpoint through which call media flows is an earpiece. |
static final int |
TYPE_SPEAKER = 4Indicates that the type of endpoint through which call media flows is a speakerphone. |
static final int |
TYPE_STREAMING = 5Indicates that the type of endpoint through which call media flows is an external. |
static final int |
Indicates that the type of endpoint through which call media flows is unknown type. |
static final int |
Indicates that the type of endpoint through which call media flows is a wired headset. |
Public constructors |
|---|
CallEndpointCompat( |
Public methods |
|
|---|---|
int |
compareTo(@NonNull CallEndpointCompat other)Compares this |
boolean |
|
final @NonNull ParcelUuid |
A unique identifier for this endpoint on the device |
final @NonNull CharSequence |
getName()Human-readable name associated with the endpoint |
final int |
getType()The type of endpoint through which call media being routed Allowed values: |
int |
hashCode() |
@NonNull String |
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
public CallEndpointCompat(
@NonNull CharSequence name,
int type,
@NonNull ParcelUuid identifier
)
| Parameters | |
|---|---|
@NonNull CharSequence name |
Human-readable name associated with the endpoint |
int type |
The type of endpoint through which call media being routed Allowed values: |
@NonNull ParcelUuid identifier |
A unique identifier for this endpoint on the device |
Public methods
compareTo
public int compareTo(@NonNull CallEndpointCompat other)
Compares this CallEndpointCompat to the other 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:
-
TYPE_WIRED_HEADSET
-
TYPE_BLUETOOTH
-
TYPE_SPEAKER
-
TYPE_EARPIECE
-
TYPE_STREAMING
-
TYPE_UNKNOWN If two endpoints have the same type, the name is compared to determine the value.
getIdentifier
public final @NonNull ParcelUuid getIdentifier()
A unique identifier for this endpoint on the device
getName
public final @NonNull CharSequence getName()
Human-readable name associated with the endpoint
getType
public final int getType()
The type of endpoint through which call media being routed Allowed values: TYPE_EARPIECE , TYPE_BLUETOOTH , TYPE_WIRED_HEADSET , TYPE_SPEAKER , TYPE_STREAMING , TYPE_UNKNOWN