# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Constants | Ctors | Methods | Inherited Methods

# WebChromeClient.FileChooserParams

`public static abstract class WebChromeClient.FileChooserParams`
`extends Object` ``

java.lang.Object
↳ | android.webkit.WebChromeClient.FileChooserParams

Parameters used in the `WebChromeClient.onShowFileChooser(WebView, ValueCallback, WebChromeClient.FileChooserParams)` method.

## Summary

### Constants
`int` | `MODE_OPEN` Open single file.
`int` | `MODE_OPEN_MULTIPLE` Like Open but allows multiple files to be selected.
`int` | `MODE_SAVE` Allows picking a nonexistent file and saving it.

### Public constructors
`FileChooserParams()`

### Public methods
`abstract Intent` | `createIntent()` Creates an intent that would start a file picker for file selection.
`abstract String[]` | `getAcceptTypes()` Returns an array of acceptable MIME types.
`abstract String` | `getFilenameHint()` The file name of a default selection if specified, or `null`.
`abstract int` | `getMode()` Returns file chooser mode.
`abstract CharSequence` | `getTitle()` Returns the title to use for this file selector.
`abstract boolean` | `isCaptureEnabled()` Returns preference for a live media captured value (e.g. Camera, Microphone).
`static Uri[]` | `parseResult(int resultCode, Intent data)` Parse the result returned by the file picker activity.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Constants

### MODE_OPEN

    public static final int MODE_OPEN

Open single file. Requires that the file exists before allowing the user to pick it.

Constant Value: 0 (0x00000000)

### MODE_OPEN_MULTIPLE

    public static final int MODE_OPEN_MULTIPLE

Like Open but allows multiple files to be selected.

Constant Value: 1 (0x00000001)

### MODE_SAVE

    public static final int MODE_SAVE

Allows picking a nonexistent file and saving it.

Constant Value: 3 (0x00000003)

## Public constructors

### FileChooserParams

    public FileChooserParams ()

## Public methods

### createIntent

    public abstract Intent createIntent ()

Creates an intent that would start a file picker for file selection. The Intent supports choosing files from simple file sources available on the device. Some advanced sources (for example, live media capture) may not be supported and applications wishing to support these sources or more advanced file operations should build their own Intent.

How to use:

1. Build an intent using `createIntent()`
2. Fire the intent using `Activity.startActivityForResult(Intent, int)`.
3. Check for ActivityNotFoundException and take a user friendly action if thrown.
4. Listen the result using `Activity.onActivityResult(int, int, Intent)`
5. Parse the result using `parseResult(int, Intent)` only if media capture was not requested.
6. Send the result using filePathCallback of `WebChromeClient.onShowFileChooser(WebView, ValueCallback, WebChromeClient.FileChooserParams)`

Returns
`Intent` | an Intent that supports basic file chooser sources.

### getAcceptTypes

    public abstract String[] getAcceptTypes ()

Returns an array of acceptable MIME types. The returned MIME type could be partial such as audio/*. The array will be empty if no acceptable types are specified.

Returns
`String[]` |

### getFilenameHint

    public abstract String getFilenameHint ()

The file name of a default selection if specified, or `null`.

Returns
`String` |

### getMode

    public abstract int getMode ()

Returns file chooser mode.

Returns
`int` |

### getTitle

    public abstract CharSequence getTitle ()

Returns the title to use for this file selector. If `null` a default title should be used.

Returns
`CharSequence` |

### isCaptureEnabled

    public abstract boolean isCaptureEnabled ()

Returns preference for a live media captured value (e.g. Camera, Microphone). True indicates capture is enabled, `false` disabled. Use `getAcceptTypes` to determine suitable capture devices.

Returns
`boolean` |

### parseResult

    public static Uri[] parseResult (int resultCode,
                    Intent data)

Parse the result returned by the file picker activity. This method should be used with `createIntent()`. Refer to `createIntent()` for how to use it.

Parameters
`resultCode` | `int`: the integer result code returned by the file picker activity.
`data` | `Intent`: the intent returned by the file picker activity.

Returns
`Uri[]` | the Uris of selected file(s) or `null` if the resultCode indicates activity canceled or any other error.

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*