I'm playing with http://www.siegmann.nl/epublib on Android. Can someone please explain the right way to
Thx 10x.
Answers #2:
protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.epub_reader);
webView = (WebView) findViewById(R.id.webview);
Book book = (new EpubReader()).readEpub(new FileInputStream(filename);
String baseUrl="file://mnt/sdcard/epub/OEBPS/"
String data = new String(book.getContents().get(2).getData());
webView.loadDataWithBaseURL(baseUrl, data, "text/html", "UTF-8", null);
}
Regarding your questions:
I'm not sure what you mean. Do you want all the content? Or something specific?
All the content can be retrieved using Book.getContent()
.
I would use WebView
for this. Haven't tried that myself though.
This I don't know what would work best.
The nl.siegmann.epublib.search
package in epublib-tools has code for a simple search functionality.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With