I've been running an Android app for 10 years now, and it seems like every time we release a new build to production through Google Play we get contacted by a little flurry of users saying that it has lost all of their data, and they are reset back to the beginning.
It seems to affect a range of users. Many of them are using phones that support external storage, but it doesn't seem to matter whether they had the app installed there or in internal storage (in our AndroidManifest.xml we have android:installLocation="auto"). I can't identify any consistent pattern about Android versions etc. I also cannot reproduce it myself, even by installing the old APK prior to the issue and then upgrading to the latest APK.
We use SQLite via the android.database.sqlite package / SQLiteOpenHelper with GreenDAO on top of that:
DBHelper helper = new DBHelper(context);
SQLiteDatabase db = helper.getWritableDatabase();
I got affected user to send screenshots of the App settings from Android. It still reports 11.55 Mb of "User data" - so I feel like the data is hiding there somewhere? But for whatever reason it's like they've been given a new database.
Has anybody ever experienced anything like this? How can I diagnose the cause? I don't know how SQLiteOpenHelper determines the filename for the database? Are there any third party apps that would let them browse the filesystem to see what database files exist?