Вопрос

I am doing an application that uses DropBox API to list all the files which are epub compliant(in Dropbox). Then it must show only the first page of the file(title), when you click the epub file, in a android ListView.

Should I download the whole epub file and then show the information, or is there a way to remotely open the file in Dropbox(I looked at possible methods in the API and found none),extract the title page, and then serve it to the phone by downloading it?

Это было полезно?

Решение

When the user clicks the ePub file in a Android ListView, you should show a ProgressBar to the user and download that ePub file. After the download gets completed, you can then proceed the user to either a self implemented ePub Viewer within your App Or navigate the user to the suitable Applications already installed on the device for reading that ePub book.

  1. In App ePub Viewer:
    Here is a nice Tutorial which you can follow to implement it:
    http://www.codeproject.com/Articles/592909/EPUB-Viewer-for-Android-with-Text-to-Speech

  2. Launching External Apps for opening that ePub Ebook:
    open an epub file from android app

P.S: If you are downloading the ePub file within your App's File Directory then you would have to make a Content Provider for your App, in order to grant access to the specific File within the Files Directory to be accessed by other Apps.

I hope this helps.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top