Udostępnij za pośrednictwem


CompanionDeviceManager.StartSystemDataTransfer Method

Definition

Start system data transfer which has been previously approved by the user.

[Android.Runtime.Register("startSystemDataTransfer", "(ILjava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=34)]
public void StartSystemDataTransfer (int associationId, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver result);
[<Android.Runtime.Register("startSystemDataTransfer", "(ILjava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=34)>]
member this.StartSystemDataTransfer : int * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit

Parameters

associationId
Int32

The unique AssociationInfo#getId ID assigned to the Association of the companion device recorded by CompanionDeviceManager

executor
IExecutor

The executor which will be used to invoke the result callback.

result
IOutcomeReceiver

The callback to notify the app of the result of the system data transfer.

Attributes

Remarks

Start system data transfer which has been previously approved by the user.

Before calling this method, the app needs to make sure #attachSystemDataTransport(int, InputStream, OutputStream) the transport channel is attached, and #buildPermissionTransferUserConsentIntent(int) the user consent dialog has prompted to the user. The transfer will fail if the transport channel is disconnected or #detachSystemDataTransport(int) detached during the transfer.

Java documentation for android.companion.CompanionDeviceManager.startSystemDataTransfer(int, java.util.concurrent.Executor, android.os.OutcomeReceiver<java.lang.Void, android.companion.CompanionException>).

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.

Applies to