ContentCaptureManager.ShareData Method

Definition

Called by the app to request data sharing via writing to a file.

[Android.Runtime.Register("shareData", "(Landroid/view/contentcapture/DataShareRequest;Ljava/util/concurrent/Executor;Landroid/view/contentcapture/DataShareWriteAdapter;)V", "", ApiSince=30)]
public void ShareData (Android.Views.ContentCaptures.DataShareRequest request, Java.Util.Concurrent.IExecutor executor, Android.Views.ContentCaptures.IDataShareWriteAdapter dataShareWriteAdapter);
[<Android.Runtime.Register("shareData", "(Landroid/view/contentcapture/DataShareRequest;Ljava/util/concurrent/Executor;Landroid/view/contentcapture/DataShareWriteAdapter;)V", "", ApiSince=30)>]
member this.ShareData : Android.Views.ContentCaptures.DataShareRequest * Java.Util.Concurrent.IExecutor * Android.Views.ContentCaptures.IDataShareWriteAdapter -> unit

Parameters

request
DataShareRequest

object specifying details of the data being shared.

executor
IExecutor
dataShareWriteAdapter
IDataShareWriteAdapter
Attributes

Remarks

Called by the app to request data sharing via writing to a file.

The ContentCaptureService app will receive a read-only file descriptor pointing to the same file and will be able to read data being shared from it.

Note: using this API doesn't guarantee the app staying alive and is "best-effort". Starting a foreground service would minimize the chances of the app getting killed during the file sharing session.

Java documentation for android.view.contentcapture.ContentCaptureManager.shareData(android.view.contentcapture.DataShareRequest, java.util.concurrent.Executor, android.view.contentcapture.DataShareWriteAdapter).

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