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

FileFormField

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

Defines a form field for sharing files.

Summary

Constants

static String

Bundle key for acceptedTypes.

static String

Bundle key for name.

Public constructors

<init>(@NonNull name: String, @NonNull acceptedTypes: MutableList<String!>)

Constructor, see field descriptions above.

Properties

MutableList<String!>

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

String

Name of the form field.

Constants

KEY_ACCEPTED_TYPES

static val KEY_ACCEPTED_TYPES: String

Bundle key for acceptedTypes.

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

KEY_NAME

static val KEY_NAME: String

Bundle key for name.

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

Public constructors

<init>

FileFormField(@NonNull name: String, @NonNull acceptedTypes: MutableList<String!>)

Constructor, see field descriptions above.

Properties

acceptedTypes

@NonNull val acceptedTypes: MutableList<String!>

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

@NonNull val name: String

Name of the form field.