You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/frameworks/file-explorer-activity.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,19 +9,20 @@ The activity is registered for the `pick_file` action, so any app can ask the us
9
9
Two modes are supported:
10
10
11
11
-**`browse`** (default): navigate directories, open files, rename or delete them.
12
-
-**`pick`**: select one or more files and return them to the caller.
12
+
-**`pick`**: select one or more files and return them to the caller. The `pick_file` action automatically uses pick mode, so callers do not need to set the `"mode"` extra.
13
13
14
14
## Launching
15
15
16
16
### Pick files with `startActivityForResult`
17
17
18
+
Using the `pick_file` action automatically opens `FileExplorerActivity` in pick mode, so you do **not** need to set the `"mode"` extra.
|`mode`|`str`|`"browse"`|`"browse"` or `"pick"`. |
53
+
|`mode`|`str`|`"browse"`(or `"pick"` when action is `"pick_file"`) |`"browse"` or `"pick"`. Only needed when launching `FileExplorerActivity` directly; the `"pick_file"` action implies picker mode automatically. |
53
54
|`start_dir`|`str`|`"."`| Directory to open. Non-existent paths are walked up to the first existing parent, falling back to `"/"`. |
54
55
|`path_pattern`|`str` or `list`|`[]`| File extensions to accept in pick mode, e.g. `[".png", ".jpg"]`. Strings may include a leading `*` (`"*.wav"`). An empty list accepts all files. |
55
56
@@ -114,7 +115,6 @@ class GalleryLauncher(Activity):
0 commit comments