Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Epub file is not visible #106

Closed
SandeepADexoit opened this issue Aug 23, 2017 · 8 comments
Closed

Epub file is not visible #106

SandeepADexoit opened this issue Aug 23, 2017 · 8 comments

Comments

@SandeepADexoit
Copy link

I have specified epub file in raw folder but it doesn't get shown in FolioReader.
What should i do ?
Also can u give me a sample .epub file.

@Maruf13
Copy link

Maruf13 commented Aug 23, 2017

@SandeepADexoit
Same problem. I put my .epub file in assets folder and call it using intent through FolioActivity.class. but my app crushed

@mahavir155
Copy link
Contributor

@SandeepADexoit Please paste your code.. You can find sample epub file in sample project..

@heinzan
Copy link

heinzan commented Aug 25, 2017

I think permission add in manifest.Read and Write Permission.This issue solved in my projet

@sdilizio
Copy link

sdilizio commented Sep 8, 2017

Same problem. Added read and write permissions in manifest. Used the sample EPUB. FolioReader interface loads but with no EPUB.

So, I just added the following to an empty activity created by Android Studio and linked the following to a button):

public void goRead(View view) {
    Intent intent = new Intent(NavActivity.this, FolioActivity.class);
    intent.putExtra(FolioActivity.INTENT_EPUB_SOURCE_TYPE, FolioActivity.EpubSourceType.ASSETS);
    intent.putExtra(FolioActivity.INTENT_EPUB_SOURCE_PATH, "epubs/adventures.epub");
    startActivity(intent);
}

@mahavir155
Copy link
Contributor

mahavir155 commented Sep 8, 2017

@sdilizio Can you check the logs for the problem and paste it here? If possible please share the epub file..

@heinzan
Copy link

heinzan commented Sep 8, 2017

@sdilizio.Check your epub file location and type.This solved for me.good luck

@sdilizio
Copy link

sdilizio commented Sep 8, 2017

Update: Fixed.
I had permissions in the Manifest, but not run-time permissions (required for Marshmallow and later).

Add the following somewhere before your intent for Folio Reader:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
requestPermissions(new String[] {Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.INTERNET}, 1);
}

Also, you need to check where FolioReader thinks the file is going to be. The logs will tell if it can't find the file and where it looked.

@mahavir155
Copy link
Contributor

Cool, so it solved.. I will close the issue

mahavir155 pushed a commit that referenced this issue Aug 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants