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 class
Possible capture attribute values.static @interface
static @interface
static class
Types of file prompts.Nested classes/interfaces inherited from class org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
GeckoSession.PromptDelegate.BasePrompt.Observer
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal int
One ofGeckoSession.PromptDelegate.FilePrompt.Capture
indicating 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 int
One ofGeckoSession.PromptDelegate.FilePrompt.Type
indicating the prompt type.Fields inherited from class org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
title
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
FilePrompt
(String id, String title, int type, int capture, String[] mimeTypes, GeckoSession.PromptDelegate.BasePrompt.Observer observer) -
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.Type
indicating 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.Capture
indicating 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)
-
-
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.PromptResponse
which can be used to complete theGeckoResult
associated 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.PromptResponse
which can be used to complete theGeckoResult
associated with this prompt.
-