Google 致力于为黑人社区推动种族平等。查看具体举措

ShareData

class ShareData
kotlin.Any
   ↳ androidx.browser.trusted.sharing.ShareData

Contains data to be delivered to a Web Share Target via a Trusted Web Activity. See androidx.browser.trusted.TrustedWebActivityIntentBuilder#setShareParams.

Summary

Constants
static String

Bundle key for text.

static String

Bundle key for title.

static String

Bundle key for uris.

Public constructors
<init>(@Nullable title: String?, @Nullable text: String?, @Nullable uris: MutableList<Uri!>?)

Creates a ShareData with the given parameters.

Public methods
static ShareData
fromBundle(@NonNull bundle: Bundle)

Unpacks the object from a Bundle.

Bundle

Packs the object into a Bundle

Properties
String?

Text of the shared message.

String?

Title of the shared message.

MutableList<Uri!>?

URIs of files to be shared.

Constants

KEY_TEXT

static val KEY_TEXT: String

Bundle key for text.

Value: "androidx.browser.trusted.sharing.KEY_TEXT"

KEY_TITLE

static val KEY_TITLE: String

Bundle key for title.

Value: "androidx.browser.trusted.sharing.KEY_TITLE"

KEY_URIS

static val KEY_URIS: String

Bundle key for uris.

Value: "androidx.browser.trusted.sharing.KEY_URIS"

Public constructors

<init>

ShareData(
    @Nullable title: String?,
    @Nullable text: String?,
    @Nullable uris: MutableList<Uri!>?)

Creates a ShareData with the given parameters.

Parameters
title String?: The title.
text String?: The text.
uris MutableList<Uri!>?: The uris.

Public methods

fromBundle

@NonNull static fun fromBundle(@NonNull bundle: Bundle): ShareData

Unpacks the object from a Bundle.

toBundle

@NonNull fun toBundle(): Bundle

Packs the object into a Bundle

Properties

text

@Nullable val text: String?

Text of the shared message.

title

@Nullable val title: String?

Title of the shared message.

uris

@Nullable val uris: MutableList<Uri!>?

URIs of files to be shared.