Android Question Google Play APK update installation issue

Discussion in 'Android Questions' started by Taha, May 8, 2015.

  1. Taha

    Taha Member Licensed User

    I found that if new version of APK was updated through Google Play some (I am not sure) additional files (in Files folder) were not overwritten. That leads to application mistakes for example if new table added into database file.

    Is it possible to force files replacement or clean installation (uninstall previous version and then install new)?
    Last edited: May 8, 2015
  2. Erel

    Erel Administrator Staff Member Licensed User

    The assets files will be replaced. Other files will not be replaced.
  3. Taha

    Taha Member Licensed User

    Sub Process_Globals
    DimDBFileNameAsString : DBFileName = 
    DimDBFileDirAsString : DBFileDir = 
    End Sub
    If File.Exists(DBFileDir, DBFileName) = False  Then
    File.Copy(File.DirAssets, DBFileName, DBFileDir, DBFileName)
                SQL1.Initialize(DBFileDir, DBFileName, 
                SQL1.Initialize(DBFileDir, DBFileName, 
    End If
    This is strange from the code - the file is supposed to be copied from Assets folder.
  4. NJDude

    NJDude Expert Licensed User

    Your code is copying the database ONLY if it doesn't exist on the device, if you update the app, the DB already exists and it won't be overwritten.
    Taha and thedesolatesoul like this.
  5. Taha

    Taha Member Licensed User

    Ooooh, yes, you are right! Many thanks, NJDude!
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice