Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

Params

class Params
kotlin.Any
   ↳ androidx.browser.trusted.sharing.ShareTarget.Params

Contains parameter names to be used for the data being shared.

Summary

Constants

static String

Bundle key for files.

static String

Bundle key for text.

static String

Bundle key for title.

Public constructors

<init>(@Nullable title: String?, @Nullable text: String?, @Nullable files: MutableList<ShareTarget.FileFormField!>?)

Constructor, see field descriptions above.

Properties

MutableList<ShareTarget.FileFormField!>?

Defines form fields for the files being shared, see FileFormField.

String?

The name of the query parameter used for the body of the message being shared.

String?

The name of the query parameter used for the title of the message being shared.

Constants

KEY_FILES

static val KEY_FILES: String

Bundle key for files.

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

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"

Public constructors

<init>

Params(@Nullable title: String?, @Nullable text: String?, @Nullable files: MutableList<ShareTarget.FileFormField!>?)

Constructor, see field descriptions above.

Properties

files

@Nullable val files: MutableList<ShareTarget.FileFormField!>?

Defines form fields for the files being shared, see FileFormField. Web Share Target can have multiple form fields associated with different MIME types. If a file passes the MIME type filters of several FileFormFields, the one that has the lowest index in this list is picked; see [1] for details. [1] https://wicg.github.io/web-share-target/level-2/#launching-the-web-share-target

text

@Nullable val text: String?

The name of the query parameter used for the body of the message being shared.

title

@Nullable val title: String?

The name of the query parameter used for the title of the message being shared.