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

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

Open Magby1 opened this issue 5 years ago • 5 comments

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

Steps to reproduce / Describe in detail -

Magby1 avatar Feb 07 '20 01:02 Magby1

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<File>() { @Override public void onLoad(FileLoadRequest request, FileResponse<File> 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();
                        }
                    });

dedongh avatar Feb 17 '20 11:02 dedongh

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

On Feb 17, 2020 6:55 AM, "Bra Emma" [email protected] 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 avatar Feb 17 '20 18:02 Magby1

Its finally works! Thank you @dedongh

On Mon, Feb 17, 2020 at 1:13 PM MAGBY Desir [email protected] wrote:

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

On Feb 17, 2020 6:55 AM, "Bra Emma" [email protected] 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 avatar Feb 18 '20 03:02 Magby1

You welcome

dedongh avatar Feb 18 '20 12:02 dedongh

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

ankit-yadav111 avatar Aug 22 '22 18:08 ankit-yadav111