FolioReader-Android icon indicating copy to clipboard operation
FolioReader-Android copied to clipboard

Epub file is not visible

Open SandeepADexoit opened this issue 9 years ago • 8 comments

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.

SandeepADexoit avatar Aug 23 '17 13:08 SandeepADexoit

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

Maruf13 avatar Aug 23 '17 16:08 Maruf13

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

mahavir155 avatar Aug 24 '17 10:08 mahavir155

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

heinzan avatar Aug 25 '17 06:08 heinzan

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);
}

sdilizio avatar Sep 08 '17 06:09 sdilizio

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

mahavir155 avatar Sep 08 '17 06:09 mahavir155

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

heinzan avatar Sep 08 '17 07:09 heinzan

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.

sdilizio avatar Sep 08 '17 07:09 sdilizio

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

mahavir155 avatar Sep 09 '17 05:09 mahavir155