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

ShareTarget.FileFormField

public static class ShareTarget.FileFormField
extends Object

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


Defines a form field for sharing files.

Summary

Constants

String KEY_ACCEPTED_TYPES

Bundle key for acceptedTypes.

String KEY_NAME

Bundle key for name.

Fields

public final List<String> acceptedTypes

List of MIME types or file extensions to be sent in this field.

public final String name

Name of the form field.

Public constructors

ShareTarget.FileFormField(String name, List<String> acceptedTypes)

Constructor, see field descriptions above.

Inherited methods

Constants

KEY_ACCEPTED_TYPES

public static final String KEY_ACCEPTED_TYPES

Bundle key for acceptedTypes.

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

KEY_NAME

public static final String KEY_NAME

Bundle key for name.

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

Fields

acceptedTypes

public final List<String> acceptedTypes

List of MIME types or file extensions to be sent in this field. The MIME type matching algorithm is specified by https://wicg.github.io/web-share-target/level-2/#determining-if-a-file-is-accepted.

name

public final String name

Name of the form field.

Public constructors

ShareTarget.FileFormField

public ShareTarget.FileFormField (String name, 
                List<String> acceptedTypes)

Constructor, see field descriptions above.

Parameters
name String

acceptedTypes List