Fixed
Status Update
Comments
am...@gmail.com <am...@gmail.com> #2
Also, it would be great to return Observable, cause Flowable has some overhead.
bo...@google.com <bo...@google.com> #3
We are going to add Single for queries (and Maybe) but for @insert, @Update and @Delete it is a bit more tricky because we would be reading those values when the computable runs, in which case developer may change them by mistake. We've not decided whether we want to take that risk or not. (We could copy but that would be additional hidden load, especially if the input is a long list).
#2, flowable can easily turn into an observable, would you like to escalate on why you think the overhead is a problem?
#2, flowable can easily turn into an observable, would you like to escalate on why you think the overhead is a problem?
d4...@gmail.com <d4...@gmail.com> #4
Cool for Single/Maybe for queries :)
For @insert, @Update and @Delete I personally would like to have the possibility to have Single/Maybe... because I will 100% of the time wrap the call into a Single to make it asynchronous and have the possibility to chain other actions with it. I understand that copying entries will take additional resources but in that case we'll have the possibility to not use the RX return type.
That my opinion ^^
Thanks !
For @insert, @Update and @Delete I personally would like to have the possibility to have Single/Maybe... because I will 100% of the time wrap the call into a Single to make it asynchronous and have the possibility to chain other actions with it. I understand that copying entries will take additional resources but in that case we'll have the possibility to not use the RX return type.
That my opinion ^^
Thanks !
Description
Path:
/extSdCard/_documentTest
Uri:
content://com.android.externalstorage.documents/tree/0000-0000%3A/document/0000-0000%3A_documentTest
SingleDocumentFile doesn't support any write features, so we are left with TreeDocumentFile which is created with:
public static DocumentFile fromTreeUri(Context context, Uri treeUri) {
final int version = Build.VERSION.SDK_INT;
if (version >= 21) {
return new TreeDocumentFile(null, context,
DocumentsContractApi21.prepareTreeUri(treeUri));
} else {
return null;
}
}
However DocumentsContractApi21.prepareTreeUri(treeUri) truncates the document id returning a DocumentFile pointing to:
content://com.android.externalstorage.documents/tree/0000-0000%3A/document/0000-0000%3A
This is NOT the same URI! It simply truncated this URI down to the tree root...
I cannot see a workaround without reflection into TreeDocumentFile.