-2

would someone provide me with the code to read an epub book and display as webView , I have tried my best to get the needed code but never got it so i wish if someone would post it for me, I need a step by step procedure as i am a beginner i am using eclipse thanks in advance

Abood
  • 13
  • 4

1 Answers1

0

You can try CoolReader here, and FBReader here.

1.epub (non-DRM), fb2, txt, rtf, html, chm, tcr, doc, pdb formats supported
2.Pages or scroll view
3.Table of contents
4.Bookmarks
5.Text search
6.Hyphenation dictionaries
7.Most complete FB2 format support: styles, tables, footnotes
8.Additional fonts support (.ttf)
9.Can read books from zip archives
10.Automatic reformatting of .txt files (autodetect headings etc.)
11.Styles can be customised in wide range using external CSS

Android specific

Page flipping animation.
Built-in file browser, quick recent books access
Day and night profiles (two sets of colors, background, backlight levels)
Brightness adjustments by flick on left edge of screen
Background texture (stretched or tiled) or solid color
Paperbook-like page turning animation or "sliding page" animation
Dictionary support (ColorDict, Fora Dictionary, Aard dictionary)
Customizable tap zone and key actions
Place additional textures to /sdcard/.cr3/textures/ -- to be used as tiled page backgrounds
Place additional textures to /sdcard/.cr3/backgrounds/ -- to be used as stretched page backgrounds (/cr3/ directory can also be used instead of /.cr3/, and internal SD or internal storage instead of /sdcard/)
TTS (text-to-speech) support
Select text using double tap (optional)
bjiang
  • 6,068
  • 2
  • 22
  • 35
  • my friend thanks for your trial but what you posted is very complicated what i need is a straight forward code to show an epub on an activity either through webview or conversion to imageview – Abood Dec 14 '14 at 15:15
  • For this, there is not simple codes, I tried http://stackoverflow.com/questions/5640728/render-epub-files-in-android/7266884#7266884, but I failed. After long time researching, I finally get a working open source EPUB reader https://github.com/nightwhistler/pageturner. It really works. – bjiang Dec 14 '14 at 17:40
  • Man I just need a webView to show my epub please help me with this – Abood Dec 15 '14 at 20:48
  • It's not that easy, I saw the pageTurner used something called Bookview to read, lots of stuffs, you can refer to code here http://stackoverflow.com/questions/10882972/render-html-elements-on-webview-for-epub-reader – bjiang Dec 15 '14 at 20:58
  • Actually, the BookView class is mostly meant for UI stuff like pageturns, etc... if you just want to display the text in the epub I'd suggest epublib (https://github.com/psiegman/epublib) and HtmlSpanner (https://github.com/NightWhistler/HtmlSpanner)... those are the 2 technologies underneath PageTurner. – NightWhistler Feb 18 '15 at 14:28