Search code examples
androidandroid-webviewepub

Working with ePub files in android


I referred this siegmann android tutorial and successfully logged the Title, Author name and Table of contents.

Now I read that the whole book can be viewed in WebView.

But I don't find any tutorial for Dispalying an ePub file.

When it comes to creating an ePub file, I found this from SO But I'm unable to implement it as I don't have any idea about main.xml.

Kindly suggest any tutorial to create and display an ePub file.

For creating ePub, I tried to refer this siegmann eg but I'm not able to understand it properly.

Do I need to provide .html for each chapter and .css in order to create an ePub file?

I know I'm little unclear in this qustion as I'm absolute beginner when it comes to working with ePub, so any suggestions/help appreciated.


Solution

  • Try this in logTableOfContents()

    while ((line = r.readLine()) != null) {
    
    line1 = line1.concat(Html.fromHtml(line).toString());
    
    }
    
    finalstr = finalstr.concat("\n").concat(line1);