GeezerVison is showing github.com — Added option for android 10 · CodeHunterDev/Android-FilePicker@04ccb2c
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: README.md +1Lines changed: 1 addition & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
|
3 | 3 | [  ](https://bintray.com/droidninja/maven/com.droidninja.filepicker/_latestVersion) |
4 | 4 |
|
5 | 5 | A filepicker which allows to select images and videos with flexibility. It also supports selection of files by specifying its file type. For using this library, you have to migrate your project to [androidx](https://developer.android.com/jetpack/androidx/migrate) or you can use older version(2.1.5). Check out app module for example. |
| 6 | +For Android 10 devices using document picker, you will need to enable `android:requestLegacyExternalStorage="true"` option in your manifest file. Document picker will get deprecated soon since this flag will not in Android 11. |
6 | 7 |
|
7 | 8 |  |
8 | 9 |  |
|
Collapse file
Copy file name to clipboardExpand all lines: app/src/main/AndroidManifest.xml +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
11 | 11 | android:icon="@mipmap/ic_launcher" |
12 | 12 | android:label="@string/app_name" |
13 | 13 | android:supportsRtl="true" |
| 14 | + android:requestLegacyExternalStorage="true" |
14 | 15 | android:theme="@style/AppTheme"> |
15 | 16 | <activity android:name=".MainActivity"> |
16 | 17 | <intent-filter> |
|
Collapse file
Copy file name to clipboardExpand all lines: app/src/main/java/vi/filepicker/MainActivity.java +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -165,7 +165,7 @@ public void onPickPhoto() { |
165 | 165 |
|
166 | 166 | public void onPickDoc() { |
167 | 167 | String[] zips = {"zip", "rar"}; |
168 | | - String[] pdfs = {"pdf"}; |
| 168 | + String[] pdfs = {"aac"}; |
169 | 169 | int maxCount = MAX_ATTACHMENT_COUNT - photoPaths.size(); |
170 | 170 | if ((docPaths.size() + photoPaths.size()) == MAX_ATTACHMENT_COUNT) { |
171 | 171 | Toast.makeText(this, "Cannot select more than " + MAX_ATTACHMENT_COUNT + " items", |
@@ -177,7 +177,7 @@ public void onPickDoc() { |
177 | 177 | .setActivityTheme(R.style.FilePickerTheme) |
178 | 178 | .setActivityTitle("Please select doc") |
179 | 179 | .addFileSupport("ZIP", zips) |
180 | | - .addFileSupport("PDF", pdfs, R.drawable.pdf_blue) |
| 180 | + .addFileSupport("AAC", pdfs, R.drawable.pdf_blue) |
181 | 181 | .enableDocSupport(true) |
182 | 182 | .enableSelectAll(true) |
183 | 183 | .sortDocumentsBy(SortingTypes.name) |
|