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: CHANGELOG.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,22 @@
1
+
## 0.4.0
2
+
3
+
Fix the current behavior of `listFiles` and `openDocumentFile` API.
4
+
5
+
### Improvements
6
+
7
+
- It's now possible to list contents of all subfolders of a granted Uri opened from `openDocumentTree` ([@EternityForest](https://github.com/EternityForest)).
8
+
- Now `ACTION_VIEW` intent builder through `openDocumentFile` API was fixed. So it's now possible to open any file of any kind in third party apps without needing specify the mime type.
9
+
10
+
### Breaking changes
11
+
12
+
- Removed Android specific APIs:
13
+
-`DocumentFile.listFiles` (Now it's only available globally).
14
+
-`buildDocumentUriUsingTree` removed due high coupling with Android API (Android specific API that are not useful on any other platforms).
15
+
-`buildDocumentUri` removed due high coupling with Android API (Android specific API that are not useful on any other platforms).
16
+
-`buildTreeDocumentUri` removed due high coupling with Android API (Android specific API that are not useful on any other platforms).
17
+
-`getDocumentThumbnail` now receives only the `uri` param instead of a `rootUri` and a `documentId`.
18
+
-`rootUri` field from `QueryMetadata` was removed due API ambiguity: there's no such concept in the Android API and this is not required by it to work well.
final Stream<PartialDocumentFile> onNewFileLoaded = documentFileOfMyGrantedUri.listFiles(columns);
322
322
```
323
323
324
-
### <samp>buildDocumentUriUsingTree</samp>
325
-
326
-
<samp>Mirror of [`DocumentsContract.buildDocumentUriUsingTree`](<https://developer.android.com/reference/android/provider/DocumentsContract#buildDocumentUriUsingTree(android.net.Uri,%20java.lang.String)>)</samp>
327
-
328
-
This is typically used to access documents under a user-selected directory tree, since it doesn't require the user to separately confirm each new document access.
329
-
330
-
For details refer to the [original docs](<https://developer.android.com/reference/android/provider/DocumentsContract#buildDocumentUriUsingTree(android.net.Uri,%20java.lang.String)>).
331
-
332
-
```dart
333
-
final Uri treeUri = ...
334
-
335
-
final PartialDocumentFile partialDocumentFile = ...
336
-
337
-
final String documentId = partialFile.data![DocumentFileColumn.id]!;
338
-
339
-
final Uri? documentUri = await buildDocumentUriUsingTree(treeUri, documentId);
340
-
```
341
-
342
-
### <samp>buildDocumentUri</samp>
343
-
344
-
<samp>Mirror of [`DocumentsContract.buildDocumentUri`](<https://developer.android.com/reference/android/provider/DocumentsContract#buildDocumentUri(java.lang.String,%20java.lang.String)>)</samp>
345
-
346
-
Less common method. Use it when you need to (e.g some SAF tutorial/API point to this method or you want a custom authority when building the document file).
347
-
348
-
For details refer to the [original docs](<https://developer.android.com/reference/android/provider/DocumentsContract#buildDocumentUri(java.lang.String,%20java.lang.String)>).
349
-
350
-
```dart
351
-
final String customAuthority = ...
352
-
final String documentId = ...
353
-
354
-
final Uri? documentUri = await buildDocumentUri(customAuthority, documentId);
355
-
```
356
-
357
-
### <samp>buildTreeDocumentUri</samp>
358
-
359
-
<samp>Mirror of [`DocumentsContract.buildTreeDocumentUri`](<https://developer.android.com/reference/android/provider/DocumentsContract#buildTreeDocumentUri(java.lang.String,%20java.lang.String)>)</samp>
360
-
361
-
Less common method. Use it when you need to (e.g some SAF tutorial/API point to this method or you want a custom authority when building the document file).
362
-
363
-
Build URI representing access to descendant documents of the given [`Document#COLUMN_DOCUMENT_ID`](https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_DOCUMENT_ID).
364
-
365
-
For details refer to the [original docs](<https://developer.android.com/reference/android/provider/DocumentsContract#buildTreeDocumentUri(java.lang.String,%20java.lang.String)>).
366
-
367
-
```dart
368
-
final String customAuthority = ...
369
-
final String documentId = ...
370
-
371
-
final Uri? documentUri = await buildDocumentUri(customAuthority, documentId);
372
-
```
373
-
374
324
### <samp>delete</samp>
375
325
376
326
<samp>Mirror of [`DocumentFile.delete`](<https://developer.android.com/reference/androidx/documentfile/provider/DocumentFile#delete()>)</samp>
@@ -598,7 +548,6 @@ This class represents but is not the mirror of the original [`DocumentFile`](htt
598
548
599
549
This class is not intended to be instantiated, and it is only used for typing and convenient purposes.
600
550
601
-
602
551
### <samp>QueryMetadata</samp>
603
552
604
553
This class wraps useful metadata of the source queries returned by the `PartialDocumentFile`.
0 commit comments