connectRemoteControl

fun connectRemoteControl(@NonNull uid: String): Boolean

Connects a remote control identified by its uid.

Connects the remote control with the best available connector, chosen as follows:

  • If there is only one available connector, then it is used to connect the remote control. Otherwise,
  • if there is only one available USB connector (note that there can be two of those in case both the device USB and the USB Debug Bridge are used), then it is used to connect the remote control.
If none of the aforementioned condition holds, then the connection fails and false is returned. connectRemoteControl method shall be used to select an appropriate connector instead.

Return

true if the connection process has started, otherwise false, for example if the remote control is not visible anymore

Parameters

uid

uid of the remote control to connect

fun connectRemoteControl(@NonNull uid: String, @NonNull connector: DeviceConnector): Boolean

Connects a remote control identified by its uid using a specific connector.

Return

true if the connection process has started, otherwise false, for example if the remote control is not visible anymore

Parameters

uid

uid of the remote control to connect

connector

the connector through which to establish the connection

fun connectRemoteControl(@NonNull uid: String, @NonNull connector: DeviceConnector, @NonNull password: String): Boolean

Connects a remote control identified by its uid.

Return

true if the connection process has started, otherwise false, for example if the remote control is not visible anymore

Parameters

uid

uid of the remote control to connect

connector

the connector through which to establish the connection

password

password to use for authentication