Over the last couple of years, I have been creating an app for a customer (also the reason that I unfortunately cannot share the code on here). The last version uploaded to the play store was targeted at API 25, and was published around July 2017.
I am currently testing a new update, and am finding that opening the database via the SQLiteOpenDatabase is causing the onCreate function to run. The data from the previous version of the app gets lost. I have installed the previous version of the app both via the play store and manually, but the upgrade is always performed directly from the new versions APK.
Data stored on intermediate development versions of the app doesn't get lost, but they all erase data from the currently released version.
The classes for managing the database haven't changed, and are using the same version code for the database. I have checked the certificates, and all versions have been signed with the same one.
Is anyone aware of other reasons that the database may be recreated? This is a serious issue, that is preventing the release of the application.