Skip to content

Commit 3a62feb

Browse files
author
Laks Castro
authored
Merge pull request #65 from lakscastro/docs/v0.4.0-changelog
Add `v0.4.0` changes to `CHANGELOG.md`
2 parents 05b9d9f + 6b61eae commit 3a62feb

2 files changed

Lines changed: 19 additions & 51 deletions

File tree

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff 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.
19+
120
## 0.3.1
221

322
Minor improvements and bug fixes:

docs/Usage/Storage Access Framework.md

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -321,56 +321,6 @@ const List<DocumentFileColumn> columns = <DocumentFileColumn>[
321321
final Stream<PartialDocumentFile> onNewFileLoaded = documentFileOfMyGrantedUri.listFiles(columns);
322322
```
323323

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-
374324
### <samp>delete</samp>
375325

376326
<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
598548

599549
This class is not intended to be instantiated, and it is only used for typing and convenient purposes.
600550

601-
602551
### <samp>QueryMetadata</samp>
603552

604553
This class wraps useful metadata of the source queries returned by the `PartialDocumentFile`.

0 commit comments

Comments
 (0)