Open shashvat-kedia opened 5 years ago
you need to download the file to show it in the device, afaik
@jesmrec Google drive supports this. They have a seperate option for downloading the pdf. I am researching more about how they do this.
ok, thanks for your effort!
@jesmrec @davigonz The PDF file has to be downloaded on to the device. To support this functionality what we can do is instead of showing the a progress bar of the pdf download(current case) we can instead show the user a PDFView(this can be obtained using 3rd party libraries like AndroidPDFViewer) and load the PDF in that view hence allowing the user to view the PDF in the app itself. Then additional option can be provided to the user to download the file( the data corresponding to the file would already have been fetch to display it on the PDF View hence no extra bandwith would be required we will just have to create a File in the local storage and save the contents in it). If the user does not want to download the file it wont be an issue as the File for the PDF would not be created unless the user explicitly clicks the download button. What do you think?
the data corresponding to the file would already have been fetch to display it on the PDF View hence no extra bandwith would be required we will just have to create a File in the local storage and save the contents in it
Does AndroidPDFViewer take care of this or should we do it manually?
@davigonz The part of saving the PDF by creating a File will have to be done manually everything else is handled by the AndroidPDFViewer library.
@jesmrec @davigonz Should I start with this then?
Should I start with this then?
@sd1998 It would be better to finish https://github.com/owncloud/android/issues/2276 before
@davigonz Shall I start working on this?
@michaelstingl @hosy , is this interesting to include in 2.12?
@michaelstingl @hosy , is this interesting to include in 2.12?
2.12 is already pretty full, but if you @sd1998 would like to help here, it would be cool! 👍
Actual behaviour
On opening a PDF file the file is downloaded automatically.
Expected behaviour
Instead the file should be opened for preview and and option should be provided to the user to download the file.
Steps to reproduce
Can this problem be reproduced with the official owncloud server? (url: https://demo.owncloud.org, user: test, password: test) Yes