FolioReader / FolioReader-Android

A Java ePub reader and parser framework for Android.
BSD 3-Clause "New" or "Revised" License
2.24k stars 710 forks source link

Please,could Anybody help me to open epub from url with FolioReader? i am new at android development. I can even download from url through download manager but still dont know how to open it within my android app with FolioReader. I searched on the net but still can't. I would appreciate your help. Thank you #435

Open Magby1 opened 4 years ago

Magby1 commented 4 years ago

Issue / Feature - FolioReader version -
FolioReader Stock / Modified -
Android SDK - Mobile / Tablet / Emulator Info -
Crash / Error -

Steps to reproduce / Describe in detail -

dedongh commented 4 years ago

Hi @Magby1 I was able to read from URL using File-Loader FileLoader.with(getApplicationContext()) .load(your_url) .fromDirectory("dir_of_your_choice", FileLoader.DIR_EXTERNAL_PUBLIC) .asFile(new FileRequestListener() { @Override public void onLoad(FileLoadRequest request, FileResponse response) {

                            File epubFile = response.getBody();

                            String filePath = epubFile.getPath();

                            FolioReader folioReader = FolioReader.get();

                            folioReader.openBook(filePath);

                        }

                        @Override
                        public void onError(FileLoadRequest request, Throwable t) {

                            Toast.makeText(MainActivity.this, "Epub Error: "+ t.getMessage(), Toast.LENGTH_SHORT).show();
                        }
                    });
Magby1 commented 4 years ago

Thanks so much ill try it as soon as possible. Thank you !

On Feb 17, 2020 6:55 AM, "Bra Emma" notifications@github.com wrote:

Hi @Magby1 https://github.com/Magby1 I was able to read from URL using File-Loader FileLoader.with(getApplicationContext()) .load(your_url) .fromDirectory("dir_of_your_choice", FileLoader.DIR_EXTERNAL_PUBLIC) .asFile(new FileRequestListener() { @override https://github.com/override public void onLoad(FileLoadRequest request, FileResponse response) {

                        File epubFile = response.getBody();

                        String filePath = epubFile.getPath();

                        FolioReader folioReader = FolioReader.get();

                        folioReader.openBook(filePath);

                    }

                    @Override
                    public void onError(FileLoadRequest request, Throwable t) {
                        waitingDialog.dismiss();
                        Toast.makeText(MainActivity.this, "Epub Error: "+ t.getMessage(), Toast.LENGTH_SHORT).show();
                    }
                });

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/FolioReader/FolioReader-Android/issues/435?email_source=notifications&email_token=AKHXI43IANAG2ZUCKPVRMHLRDJ3J3A5CNFSM4KRG3GAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL6E36I#issuecomment-586960377, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKHXI44FOYDJCVX42NZRLO3RDJ3J3ANCNFSM4KRG3GAA .

Magby1 commented 4 years ago

Its finally works! Thank you @dedongh

On Mon, Feb 17, 2020 at 1:13 PM MAGBY Desir magbydesign4you@gmail.com wrote:

Thanks so much ill try it as soon as possible. Thank you !

On Feb 17, 2020 6:55 AM, "Bra Emma" notifications@github.com wrote:

Hi @Magby1 https://github.com/Magby1 I was able to read from URL using File-Loader FileLoader.with(getApplicationContext()) .load(your_url) .fromDirectory("dir_of_your_choice", FileLoader.DIR_EXTERNAL_PUBLIC) .asFile(new FileRequestListener() { @override https://github.com/override public void onLoad(FileLoadRequest request, FileResponse response) {

                        File epubFile = response.getBody();

                        String filePath = epubFile.getPath();

                        FolioReader folioReader = FolioReader.get();

                        folioReader.openBook(filePath);

                    }

                    @Override
                    public void onError(FileLoadRequest request, Throwable t) {
                        waitingDialog.dismiss();
                        Toast.makeText(MainActivity.this, "Epub Error: "+ t.getMessage(), Toast.LENGTH_SHORT).show();
                    }
                });

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/FolioReader/FolioReader-Android/issues/435?email_source=notifications&email_token=AKHXI43IANAG2ZUCKPVRMHLRDJ3J3A5CNFSM4KRG3GAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL6E36I#issuecomment-586960377, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKHXI44FOYDJCVX42NZRLO3RDJ3J3ANCNFSM4KRG3GAA .

dedongh commented 4 years ago

You welcome

ankit-yadav111 commented 1 year ago

@dedongh This is not working for me. The following error is encountered : Cannot resolve symbol 'FileLoader'