GithubHelp home page GithubHelp logo

epubreaderandroid's Introduction

EpubReaderAndroid

ePub-Reader for Android to make it easy integrate and customize epub-Reader functionality in any Android App

Simple Integrate

<com.smartmobilefactory.epubreader.EpubView
    android:id="@+id/epubView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>
EpubView epubView = findViewById(R.id.epubView);
epubView.setEpub(epub);

Display Modes

The Epub can be displayed in different modes:

  • horizontal chapters + vertical content
epubView.setScrollDirection(EpubScrollDirection.HORIZONTAL_WITH_VERTICAL_CONTENT);
  • vertical chapters + vertical content
epubView.setScrollDirection(EpubScrollDirection.VERTICAL_WITH_VERTICAL_CONTENT);
  • single chapters + vertical content
epubView.setScrollDirection(EpubScrollDirection.SINGLE_CHAPTER_VERTICAL);

More modes may be implemented later.

Customization Settings

EpubViewSettings settings = epubView.getSettings();
settings.setFont(EpubFont.fromFontFamiliy("Monospace"));
settings.setFontSizeSp(30);

// inject code into chapters
settings.setJavascriptBridge(bridge);
settings.setCustomChapterScript(...);
settings.setCustomChapterCss(...);

Observe current status

observation is implemented using RxJava2

  • Current Chapter
  • Current Location

Installation

repositories {    
    // ...    
    maven { url "https://jitpack.io" }   
}   

dependencies {    
    compile 'com.github.smartmobilefactory:EpubReaderAndroid:XXX'
}

epubreaderandroid's People

Contributors

j-koenig avatar timfreiheit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

epubreaderandroid's Issues

memory leak

now,i use your code success by write kotlin support in gradle file , but ,when i test my code , i found oom in androidstudio monitor, and i write some destroy code in onstop funciton, but it still oom,do you have some ways to solve it?thanks!

How to Update style.css dynamically

I want to change the backgrounds and font color of the reader according to my need, please help me. I added a new style_night.css in asset, but not working.
I tried something like this, but it didn't work. I am new to both data binding and rx java, maybe this is also slowing me down :(


binding.epubView.getSettings().setCustomChapterCss(
new String[]{file:///android_asset/epubreaderandroid/style_night.css}
);

observing xPath location

Hey
i am using this to observe my ePubView xPath location:
private void observeEpub() {
binding.epubView.currentLocation()
.doOnNext(xPathLocation -> {
}).subscribe();}).subscribe();
i can save the xPath variable directly to shared pref, am i right?
is the "xPathLocation" in this case a variable or a object?
i am a bit confused on it...
thanks.

Search support ?

Hello
is it pocible to search using this greater sdk inside a epub book?
if i search in table of content or in the entire book, how to jump to the result?
any help would be apreciated.
thanks!

Uncompressed ePub?

hello team

is it pocible by any way to keep the uncompressed epub, and get rid of the .epub file?
or caching the allready decompressed epub, and load it in the next opening of the app without redecompressing the file?
i have tryed opening a huge book composed of 35 books inside, taking lot lot lot of times
if you can find a solution i'll donate...!
i love this sdk, good for blind people... what to say...!

Text to speech support ?

Hello guys,
i love this sdk..., its pretty awesome for getting started with ePub reading!
i tryed it with TalkBack for blind users, working 100%!!!
the sample app allready provide the right base to build a ebook app
can you please add tts support for reading the Current chapter, or select * speak?
thanks!

Saving & retrieving the current location

hello
i love the epub reader view...
please can you give me a basic example on how to save the current location & page on a variable, and how to move to that variable later?
thanks!

Usage questions

hello,
i have two usage questions hope to get it ;)

  1. is it pocible to provide a uncompressed ePub book to the EpubView inside a folder, or must i provide only .epub file?
    if no, can you implement a way to provide a uncompressed ebooks to the view?
    i ask this question, because there's some pretty large ebooks, that some of them have 16 to 20Parts inside them, each book can have up to 800pages
    opening those book inside the view take a long time thant expected, sometime up to 5 minutes or more
    so, providing uncompressed folder to the view could be a better way
    or maybe, uncompressing the book one time and keeping it in asset or something?

  2. if i want to save the Current page of the book in a Shared Preferences, could you provide a example for this?
    saving the page then going back to it up on opening the app is ideal...
    thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.