Package org.mozilla.geckoview
Class GeckoSession.PromptDelegate.FilePrompt
Object
org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
org.mozilla.geckoview.GeckoSession.PromptDelegate.FilePrompt
- Enclosing interface:
- GeckoSession.PromptDelegate
public static class GeckoSession.PromptDelegate.FilePrompt
extends GeckoSession.PromptDelegate.BasePrompt
FilePrompt contains the information necessary to represent a prompt for a file or files
generated by content.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classPossible capture attribute values.static @interfaceCapture type definitions for file input capture options.static @interfaceFile type definitions for file selection prompts.static classTypes of file prompts.Nested classes/interfaces inherited from class org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
GeckoSession.PromptDelegate.BasePrompt.Observer -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intOne ofGeckoSession.PromptDelegate.FilePrompt.Captureindicating the capture attribute supplied by content.final String[]An array of Strings giving the MIME types specified by the "accept" attribute, if any are specified.final intOne ofGeckoSession.PromptDelegate.FilePrompt.Typeindicating the prompt type.Fields inherited from class org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
title -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFilePrompt(String id, String title, int type, int capture, String[] mimeTypes, GeckoSession.PromptDelegate.BasePrompt.Observer observer) Constructs a FilePrompt for file selection inputs. -
Method Summary
Modifier and TypeMethodDescriptionConfirms the prompt and passes the file URI back to content.Confirms the prompt and passes the file URIs back to content.Methods inherited from class org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
confirm, dismiss, getDelegate, isComplete, setDelegate
-
Field Details
-
type
public final int typeOne ofGeckoSession.PromptDelegate.FilePrompt.Typeindicating the prompt type. -
mimeTypes
An array of Strings giving the MIME types specified by the "accept" attribute, if any are specified. -
capture
public final int captureOne ofGeckoSession.PromptDelegate.FilePrompt.Captureindicating the capture attribute supplied by content.
-
-
Constructor Details
-
FilePrompt
protected FilePrompt(@NonNull String id, @Nullable String title, int type, int capture, @Nullable String[] mimeTypes, @NonNull GeckoSession.PromptDelegate.BasePrompt.Observer observer) Constructs a FilePrompt for file selection inputs.- Parameters:
id- the unique identifier for this prompttitle- the title text for the prompt; may be nulltype- the file prompt type (single, multiple, or folder)capture- the capture attribute specified by contentmimeTypes- the array of MIME types from the "accept" attribute; may be nullobserver- the observer to notify when the prompt is completed
-
-
Method Details
-
confirm
@UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull Context context, @NonNull Uri uri) Confirms the prompt and passes the file URI back to content.- Parameters:
context- An Application context for parsing URIs.uri- The URI of the file chosen by the user.- Returns:
- A
GeckoSession.PromptDelegate.PromptResponsewhich can be used to complete theGeckoResultassociated with this prompt.
-
confirm
@UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull Context context, @NonNull Uri[] uris) Confirms the prompt and passes the file URIs back to content.- Parameters:
context- An Application context for parsing URIs.uris- The URIs of the files chosen by the user.- Returns:
- A
GeckoSession.PromptDelegate.PromptResponsewhich can be used to complete theGeckoResultassociated with this prompt.
-