ShareTarget.Params


class ShareTarget.Params


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

Summary

Constants

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

Bundle key for files.

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.

Public constructors

Params(
    title: String?,
    text: String?,
    files: (Mutable)List<ShareTarget.FileFormField!>?
)

Creates a Params with the given parameters.

Public properties

(Mutable)List<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

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

Bundle key for files.

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.

Public constructors

Params

Added in 1.2.0
Params(
    title: String?,
    text: String?,
    files: (Mutable)List<ShareTarget.FileFormField!>?
)

Creates a Params with the given parameters.

Parameters
title: String?

The title.

text: String?

The text.

files: (Mutable)List<ShareTarget.FileFormField!>?

The files.

Public properties

files

Added in 1.2.0
val files: (Mutable)List<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

Added in 1.2.0
val textString?

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

title

Added in 1.2.0
val titleString?

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