ShareData


class ShareData


Contains data to be delivered to a Web Share Target via a Trusted Web Activity. See setShareParams.

Summary

Constants

const String!
KEY_TEXT = "androidx.browser.trusted.sharing.KEY_TEXT"

Bundle key for text.

const String!
KEY_TITLE = "androidx.browser.trusted.sharing.KEY_TITLE"

Bundle key for title.

const String!
KEY_URIS = "androidx.browser.trusted.sharing.KEY_URIS"

Bundle key for uris.

Public constructors

ShareData(title: String?, text: String?, uris: (Mutable)List<Uri!>?)

Creates a ShareData with the given parameters.

Public functions

java-static ShareData
fromBundle(bundle: Bundle)

Unpacks the object from a Bundle.

Bundle

Packs the object into a Bundle

Public properties

String?

Text of the shared message.

String?

Title of the shared message.

(Mutable)List<Uri!>?

URIs of files to be shared.

Constants

KEY_TEXT

Added in 1.2.0
const val KEY_TEXT = "androidx.browser.trusted.sharing.KEY_TEXT": String!

Bundle key for text.

KEY_TITLE

Added in 1.2.0
const val KEY_TITLE = "androidx.browser.trusted.sharing.KEY_TITLE": String!

Bundle key for title.

KEY_URIS

Added in 1.2.0
const val KEY_URIS = "androidx.browser.trusted.sharing.KEY_URIS": String!

Bundle key for uris.

Public constructors

ShareData

Added in 1.2.0
ShareData(title: String?, text: String?, uris: (Mutable)List<Uri!>?)

Creates a ShareData with the given parameters.

Parameters
title: String?

The title.

text: String?

The text.

uris: (Mutable)List<Uri!>?

The uris.

Public functions

fromBundle

Added in 1.2.0
java-static fun fromBundle(bundle: Bundle): ShareData

Unpacks the object from a Bundle.

toBundle

Added in 1.2.0
fun toBundle(): Bundle

Packs the object into a Bundle

Public properties

text

Added in 1.2.0
val text: String?

Text of the shared message.

title

Added in 1.2.0
val title: String?

Title of the shared message.

uris

Added in 1.2.0
val uris: (Mutable)List<Uri!>?

URIs of files to be shared.