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

ShareTarget.Params

public static class ShareTarget.Params
extends Object

java.lang.Object
   ↳ androidx.browser.trusted.sharing.ShareTarget.Params


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

Summary

Constants

String KEY_FILES

Bundle key for files.

String KEY_TEXT

Bundle key for text.

String KEY_TITLE

Bundle key for title.

Fields

public final List<ShareTarget.FileFormField> files

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

public final String text

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

public final String title

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

Public constructors

ShareTarget.Params(String title, String text, List<ShareTarget.FileFormField> files)

Constructor, see field descriptions above.

Inherited methods

Constants

KEY_FILES

public static final String KEY_FILES

Bundle key for files.

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

KEY_TEXT

public static final String KEY_TEXT

Bundle key for text.

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

KEY_TITLE

public static final String KEY_TITLE

Bundle key for title.

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

Fields

files

public final List<ShareTarget.FileFormField> files

Defines form fields for the files being shared, see ShareTarget.FileFormField. Web Share Target can have multiple form fields associated with different MIME types. If a file passes the MIME type filters of several ShareTarget.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

public final String text

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

title

public final String title

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

Public constructors

ShareTarget.Params

public ShareTarget.Params (String title, 
                String text, 
                List<ShareTarget.FileFormField> files)

Constructor, see field descriptions above.

Parameters
title String

text String

files List