-
Notifications
You must be signed in to change notification settings - Fork 720
Home
Hrishikesh Kadam edited this page Jun 29, 2018
·
17 revisions
FolioReader-Android is an ePub reader written in Java.
Add following dependency to your app build.gradle:
compile 'com.folioreader:folioreader:0.4.0'
Add maven repository to your top level build.gradle:
allprojects {
repositories {
maven {
url "http://dl.bintray.com/mobisystech/maven"
}
}
}
First add permissions and activity tag for FolioActivity
in your AndroidManifest.xml
:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.folioreader.android.sample">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<application>
...
<activity
android:name="com.folioreader.ui.folio.activity.FolioActivity"
android:theme="@style/AppTheme.NoActionBar" />
...
</application>
</manifest>
Note: In case if you are upgrading to 0.4.0 and above don't forget to remove android:configChanges="orientation|screenSize"
from <activity>
tag of FolioActivity
.
Get singleton object of FolioReader
:
FolioReader folioReader = FolioReader.getInstance(getApplicationContext());
Call the function openBook()
:
folioReader.openBook("file:///android_asset/TheSilverChair.epub");
folioReader.openBook(R.raw.adventures);