CompanionDeviceManager.TrustPairingCallback


public static abstract class CompanionDeviceManager.TrustPairingCallback
extends Object

java.lang.Object
   ↳ android.companion.CompanionDeviceManager.TrustPairingCallback


Callback for applications to receive updates about and the outcome of CompanionDeviceManager.requestDeviceTrustPairing(int, OutOfBandPairingRequest, int, Executor, TrustPairingCallback)

Summary

Public constructors

TrustPairingCallback()

Public methods

abstract void onDeviceTrusted(AssociationInfo associationInfo)

Invoked when the device is trusted.

abstract void onFailure(int errorCode)

Invoked if the trust pairing could not be created or explicitly failed.

abstract void onTrustPairingCanceledFromRemote(AssociationInfo associationInfo, IntentSender cancelIntentSender)

Invoked when the trust pairing is canceled by the remote device.

abstract void onTrustPairingPending(IntentSender intentSender)

Invoked when a trust pairing confirmation is required.

Inherited methods

Public constructors

TrustPairingCallback

public TrustPairingCallback ()

Public methods

onDeviceTrusted

Added in version 37.2
public abstract void onDeviceTrusted (AssociationInfo associationInfo)

Invoked when the device is trusted.

Parameters
associationInfo AssociationInfo: contains details of the newly-trusted association.
This value cannot be null.

onFailure

Added in version 37.2
public abstract void onFailure (int errorCode)

Invoked if the trust pairing could not be created or explicitly failed.

Parameters
errorCode int: One of: .
Value is one of the following:

onTrustPairingCanceledFromRemote

Added in version 37.2
public abstract void onTrustPairingCanceledFromRemote (AssociationInfo associationInfo, 
                IntentSender cancelIntentSender)

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

Added in version 37.2
public abstract void onTrustPairingPending (IntentSender intentSender)

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.