CallEndpointCompat
@RequiresApi(value = 26)
class CallEndpointCompat : Comparable
Constructor for a CallEndpointCompat object.
Summary
Constants |
|
|---|---|
const Int |
TYPE_BLUETOOTH = 2Indicates that the type of endpoint through which call media flows is a Bluetooth. |
const Int |
TYPE_EARPIECE = 1Indicates that the type of endpoint through which call media flows is an earpiece. |
const Int |
TYPE_SPEAKER = 4Indicates that the type of endpoint through which call media flows is a speakerphone. |
const Int |
TYPE_STREAMING = 5Indicates that the type of endpoint through which call media flows is an external. |
const Int |
Indicates that the type of endpoint through which call media flows is unknown type. |
const Int |
Indicates that the type of endpoint through which call media flows is a wired headset. |
Public constructors |
|---|
CallEndpointCompat(name: CharSequence, type: Int, identifier: ParcelUuid) |
Public functions |
|
|---|---|
open operator Int |
compareTo(other: CallEndpointCompat)Compares this |
open operator Boolean |
|
open Int |
hashCode() |
open String |
toString() |
Public properties |
|
|---|---|
ParcelUuid |
A unique identifier for this endpoint on the device |
CharSequence |
Human-readable name associated with the endpoint |
Int |
The type of endpoint through which call media being routed Allowed values: |
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
CallEndpointCompat(name: CharSequence, type: Int, identifier: ParcelUuid)
| Parameters | |
|---|---|
name: CharSequence |
Human-readable name associated with the endpoint |
type: Int |
The type of endpoint through which call media being routed Allowed values: |
identifier: ParcelUuid |
A unique identifier for this endpoint on the device |
Public functions
compareTo
open operator fun compareTo(other: CallEndpointCompat): Int
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.
Public properties
identifier
val identifier: ParcelUuid
A unique identifier for this endpoint on the device
type
val type: Int
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