Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
awaisabbasaa11 opened this issue Jun 7, 2021 · 2 comments

Comments

@awaisabbasaa11
Copy link

awaisabbasaa11 commented Jun 7, 2021

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 awaisabbasaa11 changed the title same epub file with new content is not showing new content, showing only old content (Need Urgent Help) same epub file with new content is not showing new content, showing only old content Jun 7, 2021
@amkrys
Copy link

amkrys commented Jul 9, 2021

try changing file names

@ngCarlos
Copy link

ngCarlos commented Nov 7, 2021

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
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants