Good example of using Readium as a core application component for navigation? #36
-
I'm working on an OPDS reader application (cross platform, targeting iPad and Android tablets) to use with my server project (ComiXed). I've been using Readium to retrieve the OPDS feed, and am currently struggling with getting it to download a publication from the server. Is it possible to use Readium as the core of the app's server navigations? IOW, is there a way I can provide a component of Readium the server details (hostname, port, initial uri, username, password) and have it do the interactions, and just have my app respond to state changes during navigation? It would certainly make the application easier to write. I looked but didn't see a decent example of how to do this. Is there an example somewhere of just this sort of application? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Hi, All what Readium can do for you is parsing responses from your OPDS server and, for convenience, doing the HTTP requests (see OPDS1Parser and OPDS2Parser). |
Beta Was this translation helpful? Give feedback.
-
No that’s actually he opposite of what I asked.
I want to attach my own UX components to Readium to display the links,
publications, etc. when a user wants to navigate our server. I’m asking for
an example app that’s shows how one would initiate events in readium to
talk to a server and provide navigation events.
|
Beta Was this translation helpful? Give feedback.
-
Have a look at the test apps. That's all what we have. |
Beta Was this translation helpful? Give feedback.
This is already what you get in the individual
OPDS2Parser.parseUrlString()
APIs. It returns aParseData
which contains either a feed or a publication.There are no need for callbacks because there are no push events from the OPDS server. You (the app) supplies an URL to an OPDS feed and Readium returns the parsed response as a native model. When you get the response you can update the state.