Open Magby1 opened 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
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();
}
});
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 .
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 .
You welcome
@dedongh This is not working for me. The following error is encountered : Cannot resolve symbol 'FileLoader'
Issue / Feature - FolioReader version -
FolioReader Stock / Modified -
Android SDK - Mobile / Tablet / Emulator Info -
Crash / Error -
Steps to reproduce / Describe in detail -