CompanionDeviceManager.RequestDeviceTrustPairing Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Request the system to initiate a trusted pairing process for the given association.
[Android.Runtime.Register("requestDeviceTrustPairing", "(ILandroid/companion/OutOfBandPairingRequest;[ILjava/util/concurrent/Executor;Landroid/companion/CompanionDeviceManager$TrustPairingCallback;)V", "", ApiSince=37)]
public void RequestDeviceTrustPairing(int associationId, Android.Companion.OutOfBandPairingRequest? requestOobPairing, int[] trustTypes, Java.Util.Concurrent.IExecutor executor, Android.Companion.CompanionDeviceManager.TrustPairingCallback callback);
[<Android.Runtime.Register("requestDeviceTrustPairing", "(ILandroid/companion/OutOfBandPairingRequest;[ILjava/util/concurrent/Executor;Landroid/companion/CompanionDeviceManager$TrustPairingCallback;)V", "", ApiSince=37)>]
member this.RequestDeviceTrustPairing : int * Android.Companion.OutOfBandPairingRequest * int[] * Java.Util.Concurrent.IExecutor * Android.Companion.CompanionDeviceManager.TrustPairingCallback -> unit
Parameters
- associationId
- Int32
the unique ID assigned to the Association recorded by CompanionDeviceManager
- requestOobPairing
- OutOfBandPairingRequest
request for out-of-band pairing. This value may be null.
- trustTypes
- Int32[]
list of trust types to be enabled that require trust pairing (or an empty array if no trust types are requested). This value cannot be null. Value is one of the following: TRUST_TYPE_SCREEN_AUTOMATION; TRUST_TYPE_PROACTIVE_ASSISTANCE; TRUST_TYPE_CROSS_DEVICE_AUTHENTICATION
- executor
- IExecutor
the executor to use for the callback. This value cannot be null.
the callback to be invoked for the pairing process. This value cannot be null.
- Attributes
Remarks
Request the system to initiate a trusted pairing process for the given association. This process is required to enable certain features that demand a higher level of trust between the devices.
The outcome of the pairing process will be delivered via the provided TrustPairingCallback. The callback will first receive TrustPairingCallback.onTrustPairingPending(IntentSender) with an IntentSender to launch a user confirmation dialog. Upon user confirmation and successful pairing, TrustPairingCallback.onDeviceTrusted(AssociationInfo) will be invoked. If the process fails or is canceled, TrustPairingCallback.onFailure(int) or TrustPairingCallback.onTrustPairingCanceledFromRemote(AssociationInfo,IntentSender) will be called.
Android reference for android.companion.CompanionDeviceManager.requestDeviceTrustPairing.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.