WebChromeClient.FileChooserParams.CreateIntent Method

Definition

Creates an intent that would start a file picker for file selection.

[Android.Runtime.Register("createIntent", "()Landroid/content/Intent;", "GetCreateIntentHandler")]
public abstract Android.Content.Intent CreateIntent ();
[<Android.Runtime.Register("createIntent", "()Landroid/content/Intent;", "GetCreateIntentHandler")>]
abstract member CreateIntent : unit -> Android.Content.Intent

Returns

an Intent that supports basic file chooser sources.

Attributes

Remarks

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: <ol> <li>Build an intent using #createIntent</li> <li>Fire the intent using android.app.Activity#startActivityForResult.</li> <li>Check for ActivityNotFoundException and take a user friendly action if thrown.</li> <li>Listen the result using android.app.Activity#onActivityResult</li> <li>Parse the result using #parseResult only if media capture was not requested.</li> <li>Send the result using filePathCallback of WebChromeClient#onShowFileChooser</li> </ol>

Java documentation for android.webkit.WebChromeClient.FileChooserParams.createIntent().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to