Jamie Craane
06/10/2020, 10:23 AMParcelFileDescriptor.open(file, ParcelFileDescriptor.parseMode(mode))
it works from Gmail. This is using the
readFilesUsingOpenDocumment() function.
- When I read in the contents and use createReliablePipe, I can get the contents in the sample app but not in Gmail., which gives the following exception:
2020-06-10 09:15:31.643 14097-14235/nl.jcraane.myapplication E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #2
Process: nl.jcraane.myapplication, PID: 14097
Caused by: java.io.IOException: write failed: EPIPE (Broken pipe)
This is using the readFileUsingReliablePipe() function.
- When I use createReliablePipe and I do not use a ASyncTask, the app hangs when large amounts (more than a couple of Kb) of data are transferred.
Does anyone have more insights in how openDocument should be implemented? Ideally I also want to download files via a URL and stream the bytes back when the download is finished. Is there a possibility of letting the calling app know a download is in progress (to show a progress bar)? How should createReliablePipe be used correctly?
Thanks!