MediaSession.ControllerInfo

Added in 1.0.0
Deprecated in 1.3.0

class MediaSession.ControllerInfo


Information of a controller.

Summary

Public functions

Boolean
equals(obj: Any!)
Bundle

Gets the connection hints sent from controller, or EMPTY if none.

String

Gets the package name.

Int

Gets the UID of the controller.

Int
String!

Public functions

equals

fun equals(obj: Any!): Boolean

getConnectionHints

Added in 1.0.0
Deprecated in 1.3.0
fun getConnectionHints(): Bundle

Gets the connection hints sent from controller, or EMPTY if none.

getPackageName

Added in 1.0.0
Deprecated in 1.3.0
fun getPackageName(): String

Gets the package name. Can be LEGACY_CONTROLLER for interoperability.

Interoperability: Package name may not be precisely obtained for legacy controller API on older device. Here are details.

SDK version when package name isn't precise for legacy controller
SDK_VERSION<21 Actual package name via getNameForUid with UID. It's sufficient for most cases, but doesn't precisely distinguish caller if it uses shared user ID.
21SDK_VERSION<24 LEGACY_CONTROLLER
Returns
String

package name of the controller. Can be LEGACY_CONTROLLER if the package name cannot be obtained.

getUid

Added in 1.0.0
Deprecated in 1.3.0
fun getUid(): Int

Gets the UID of the controller. Can be a negative value for interoperability.

Interoperability: If 21SDK_VERSION<28, then UID would be a negative value because it cannot be obtained.

Returns
Int

uid of the controller. Can be a negative value if the uid cannot be obtained.

hashCode

fun hashCode(): Int

toString

fun toString(): String!