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

(Need Urgent Help) same epub file with new content is not showing new content, showing only old content

Open awaisabbasaa11 opened this issue 3 years ago • 2 comments

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

FolioReader app is not loading the updated epub file with same file name, if the two file have a same name folio reader app will always show the content of first file that we opened with the folio reader with this same name, even clearing cache, data, and uninstalling app did not help

Steps to reproduce / Describe in detail -

  1. Load xyz.epub file
  2. open xyz in the folioReader application
  3. change/edit/add content in the xyz.epub file
  4. replace new xyz.epub with old file in raw/assets folder
  5. run the app and open the xyz.epub file
  6. app will show the old content new content will not be available

I notice if you change the file name for example xyz to abc then new content will be available but the highlights will be lost, can somebody help me fix this issue

awaisabbasaa11 avatar Jun 07 '21 07:06 awaisabbasaa11

try changing file names

amkrys avatar Jul 09 '21 13:07 amkrys

Little too late, but hopefully this will help. You need to delete the temporary file created by the library.

fun deleteEpubFile(epubFileName: String): Boolean {
        try {
            File(getFolioEpubPath(epubFileName)).apply {
                return if (this.exists()) this.deleteRecursively() else false
            }
        } catch (iOE: IOException) {
            return false
        } catch (se: SecurityException) {
            return false
        }
    }

private fun getFolioEpubPath(epubFileName: String): String {
        return Environment.getExternalStorageDirectory().absolutePath + "/" + FOLIO_READER_ROOT + "/" + epubFileName
    }

ngCarlos avatar Nov 07 '21 15:11 ngCarlos