TrustPairingCallback
abstract class TrustPairingCallback
| kotlin.Any | |
| ↳ | android.companion.CompanionDeviceManager.TrustPairingCallback |
Callback for applications to receive updates about and the outcome of requestDeviceTrustPairing
Summary
| Public constructors | |
|---|---|
| Public methods | |
|---|---|
| abstract Unit |
onDeviceTrusted(associationInfo: AssociationInfo)Invoked when the device is trusted. |
| abstract Unit |
Invoked if the trust pairing could not be created or explicitly failed. |
| abstract Unit |
onTrustPairingCanceledFromRemote(associationInfo: AssociationInfo, cancelIntentSender: IntentSender)Invoked when the trust pairing is canceled by the remote device. |
| abstract Unit |
onTrustPairingPending(intentSender: IntentSender)Invoked when a trust pairing confirmation is required. |
Public constructors
TrustPairingCallback
TrustPairingCallback()
Public methods
onDeviceTrusted
abstract fun onDeviceTrusted(associationInfo: AssociationInfo): Unit
Invoked when the device is trusted.
| Parameters | |
|---|---|
associationInfo |
AssociationInfo: contains details of the newly-trusted association. This value cannot be null. |
onFailure
abstract fun onFailure(errorCode: Int): Unit
Invoked if the trust pairing could not be created or explicitly failed.
onTrustPairingCanceledFromRemote
abstract fun onTrustPairingCanceledFromRemote(
associationInfo: AssociationInfo,
cancelIntentSender: IntentSender
): Unit
Invoked when the trust pairing is canceled by the remote device. The application is expected to launch the provided cancelIntentSender to cancel the trust pairing.
| Parameters | |
|---|---|
associationInfo |
AssociationInfo: contains details of the association. This value cannot be null. |
cancelIntentSender |
IntentSender: an IntentSender which applications should launch in order to cancel the trust pairing dialog. This value cannot be null. |
onTrustPairingPending
abstract fun onTrustPairingPending(intentSender: IntentSender): Unit
Invoked when a trust pairing confirmation is required. This can happen when the pairing was initiated by the local device. The application is expected to launch the provided intentSender to display the user confirmation dialog.
| Parameters | |
|---|---|
intentSender |
IntentSender: an IntentSender which applications should use to launch the UI for the user to confirm the trust pairing. This value cannot be null. |