I’m not sure what’s going on, but when I reinstall my app on my OnePlus 5T, everything works as expected.
However, reinstalling it on a Samsung M30s seems to mess up the localstorage somehow. Even if go in to Settings > Apps and delete the app’s cache and storage before I uninstall the app, it does not recreate a fresh database when I reinstall the app.
Instead, it loads some very old data from somewhere (I don’t know from where since I delete both the cache + storage), leaving the data completely broken. I have even tried rebooting the phone between uninstall in install, to no avail.
After a lot of searching I’ve found that the only way to force the Samsung phone to do a fresh install is to modify
AndroidManifest.xml, with the following lines:
However, I do want a backup in general, so this is a not a solution (I think).
Before each apk-build I also update the
version string in
build.gradle, but it makes no difference.
It seems some phones behave differently regarding localstorage.
So what’s going on here??