Question

I am developing a app which copy .epub file from assets to device and then read .epub file from that location. And I am using free open source FBReader to read the epub file.Can anyone know how to set the path of the book that directly open when app is started.

I try to use code from this link. I copy-paste this code into new class but when app started the it show about FBreader page.

No correct solution

OTHER TIPS

i foud this.. Hope this will help you

String path = /data/data/<app_package_name>/filename.epub
File file = new File(path);
    if (extension.equals(".epub") || ext.equals(".txt") || ext.equals(".doc")
                        || ext.equals(".rtf") || ext.equals(".fb2")) {
                    intent.setDataAndType(Uri.fromFile(file), "application/epub" + " OR "
                            + "application/txt" + " OR " + "application/doc" + " OR "
                            + "application/rtf" + " OR " + "application/fb2");
                    ComponentName cn = new ComponentName("org.geometerplus.zlibrary.ui.android",
                            "org.geometerplus.android.fbreader.FBReader");
                    intent.setComponent(cn);
                }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top