/epublibDroid

Android sdk for reading Epub using epublib (http://siegmann.nl/epublib)

Primary LanguageJava

epublibDroid

Android sdk for reading Epub using epublib (http://siegmann.nl/epublib)

Sample App Code

Gradle

compile 'in.nashapp.epublibdroid:epublibdroid:0.0.9'

Variables

Book book; //epublib book object
List<Chapter> ChapterList : Chapter has Name and Content
int THEME_LIGHT = 1;
int THEME_DARK = 2;

EpubReaderListener

EpubReaderView ePubReader = new EpubReaderView(context);
ePubReader.setEpubReaderListener(new EpubReaderView.EpubReaderListener() {
void OnPageChangeListener(int ChapterNumber,int PageNumber,float ProgressStart,float ProgressEnd)
void OnChapterChangeListener(int ChapterNumber){}
void OnTextSelectionModeChangeListner(Boolean mode){}
void OnLinkClicked(String url){}
void OnBookStartReached(){}
void OnBookEndReached(){}
}

Functions

void OpenEpubFile(String epub_location)
void GotoPosition(int ChapterNumber,final float Progress)
void ListChaptersDialog(int theme)
void NextPage()
void PreviousPage()
void NextChapter()
void PreviousChapter()
int GetTheme() //1 is THEME_LIGHT , 2 is THEME_DARK 
void SetTheme(int theme)//1 is DayMode , 2 is NightMode
void ProcessTextSelection()
String getSelectedText()// Run after 100ms running ProcessTextSelection()
void Highlight(String jsonData,String hashcolor)
String GetChapterContent()
void ExitSelectionMode()
float GetProgress()
int GetChapterNumber()