I have multiple .epub file in assets, I want that all .epub file in listFile
. In my old code i use external storage file path, for getting .epub files, like this
File myFile = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/Files" );
File listFile[] = myFile.listFiles();
if (listFile != null && listFile.length > 0) {
for (int i = 0; i < listFile.length; i++) {
if (listFile[i].getName().endsWith(".epub")) {
myNewBookModels = new NewBookModels();
Log.i(TAG, "getEpubFilesFromFileManager: " + ".." + listFile[i].getName());
myNewBookModels.setBookName(listFile[i].getName().toString());
myNewBookModels.setBookPath(listFile[i].getPath().toString());
myNewBookModels.setBitmap(bookLoaded(listFile[i].getName().toString()));
arrayList.add(myNewBookModels);
}
}
}
but i want that .epub files from assets folder. How can i do this?
I also want this field from that .epub file
1) Name
2) Path
3) Bitmap (cover page Image)
It is compulsory for me. This can only possible in File
but i want assets .epub file in File