hanyoud / android-daisy-epub-reader

Automatically exported from code.google.com/p/android-daisy-epub-reader
1 stars 0 forks source link

NewStory: Download Daisy Books From Online Web Sites #65

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Provide a way to connect to external locations to download daisy books from 
public online web sites.

There are several sources of freely available DAISY books online. 

Users should be able to download these freely available DAISY books from these 
online sites to their local Android device in order to then listen to or read 
these books using the new DaisyReader software.

We will add support for several online sites. We may consider adding other 
online sites in future. Please add details to sites you would like us to add as 
comments to this 'issue'.

The proposed sites are:
   * http://www.daisy.org/sample-content
   * http://www.htctu.net/demos/ (only for the DAISY samples)

Original issue reported on code.google.com by julianharty on 19 Jun 2013 at 6:09

GoogleCodeExporter commented 8 years ago
Here are some ideas on ways to implement support. These are for guidance and 
not intended to be prescriptive.

   1. Launch an embedded WebView directed to the URL. Specify the target directory for downloads. Allow the user to pick the files and download those they choose. Advantages: simple to implement. Disadvantages: May not work well with self-voicing or Android Accessibility. Users may download other content than DAISY books without realising the app cannot open or read that content.

   2. Hard-code the URLs for existing books and allow the user to pick any of these. Advantages: simple to implement, reduces risk of downloading unsuitable content. Disadvantages: changes to the web site may cause links to fail. New books will not be available until we add the relevant link to the app.

   3. Parse the web page in code to dynamically extract the set of books, and any info about those books. Advantages: reflects the dynamic nature of web site content and can adapt to changes to the set of books offered. Disadvantages: the parsing may be fragile if the structure of the web site changes and cause the parsing / download to fail entirely. Different parsing patterns need to be created for each web site / web page.

For the second and third approaches the app could download data from an online 
source, e.g. this site, to obtain the current list or the current parsing 
templates. Potentially the app could allow additional sites to be added too.

Original comment by julianharty on 19 Jun 2013 at 6:17

GoogleCodeExporter commented 8 years ago
Longer term we would like sites to provide a stable, usable API to enable the 
app to query for suitable content and allow the content to be downloaded. 
Several sites and projects are interested in providing this capability. We are 
keen to work with you to design and implement the API and make it publicly 
available so other sites can also implement the API freely.

Original comment by julianharty on 19 Jun 2013 at 6:19

GoogleCodeExporter commented 8 years ago
Hi Julian,

In beta version we will need to improve the GUI. Attachment is my first change 
about the UI that supports to implement this story (download books). Please 
give your ideas if you have any.

I also see the story #72 that mentioned about changing the behaviours of 
current version 
(https://code.google.com/p/android-daisy-epub-reader/issues/detail?id=72).

In the current version:

- Single tap: read the content of item (eg. book name, line in table of 
content...)
- Long press: select (eg. select book to speak). How do you think about the 
change of these behaviours?

As I mentioned in alpha version we didn't turn on Talk Back to test the app, so 
I suggest to try with Talk back (and/or even Explore-by-touch) to see what 
happen. Any feedbacks are welcome...

Original comment by tranquangminhtan@gmail.com on 25 Jun 2013 at 8:32

Attachments:

GoogleCodeExporter commented 8 years ago
Frankly I don't expect first 3 your solutions for a long term, however I am 
thinking of  API solution as yours and we should identify any obstacles to 
approach it. Right now I just concern to whether daisy book sites enable us to 
add APIs.

Another solution we can build 1 own site which provides free daisy books, at 
the back site, we will provide APIs and collect daisy books as first your 3 
solutions. In this case our app just connect to APIs and user feels happy with 
source of books.

Original comment by nguyenth...@gmail.com on 26 Jun 2013 at 4:32

GoogleCodeExporter commented 8 years ago
I agree with you, the first three are not scalable nor robust. They're simply a 
start to enable some users to download some minute number of books (a few tens 
of DAISY books of the potentially millions available from daisy book 
providers). 

I have spoken to about 7 of the major providers of DAISY books so far, and 
there are some members of the DAISY consortium, who are involved in these and 
other providers. Of the ones I've spoken to, a couple provide APIs of one type 
or another. I think if we're able to provide a documented, working API they and 
others may be willing to adopt it and use it. So the proposal to create our own 
interim site may be a good approach overall. I doubt we'd ever have sufficient 
volume of DAISY books to be a major source of these books.

Original comment by julianharty on 26 Jun 2013 at 7:32

GoogleCodeExporter commented 8 years ago
Added Milestone of Alpha 003

Original comment by julianharty on 26 Jun 2013 at 8:32

GoogleCodeExporter commented 8 years ago
We have an initial working implementation available in Sprint 2 of the Beta 
release of the new DaisyReader app. 

The current implementation stores pre-determined information in XML as metadata
https://github.com/julianharty/new-android-daisy-reader/blob/master/DaisyBookLis
ter/assets/metadata.xml

The related Android UI to download books is: 
https://github.com/julianharty/new-android-daisy-reader/blob/master/DaisyBookLis
ter/src/org/androiddaisyreader/apps/DaisyReaderDownloadBooks.java  

This implementation would benefit from several improvements, including:
   * speak to the user, using TTS, when starting the download, while the download is in progress and on completion
   * handle the back action (e.g. when a user presses the back button) by informing the user audibly what's happened and what their options are.
   * make the download logic robust to loss of network communications during the download.

Original comment by julianharty on 19 Jul 2013 at 2:39

GoogleCodeExporter commented 8 years ago
Note: perhaps we should implement the download as an Android service that 
implements a download API? That way we can design and implement the API and 
test it as part of the app (as well as testing in separately).

Original comment by julianharty on 19 Jul 2013 at 2:41