0

The previous version of my Android app was a beta version and soon I will be releasing the final version. The amount of changes that have taken place between the old and new version is significant. While the new version does take provide upgrading the sqlite database from the older version, it is still possible that upgrading from the beta to the final may result in the newer version not running correctly. There are too many changes to know whether the upgrade will run smoothly.

I would prefer to have the user uninstall the older version before installing the newer version. While I can request that in the docs, in reality, Android detects the newer version automatically and suggests to the user to upgrade. If there is a way to avoid that, I would like to. I really don't want to mess with my signed key and still wish to maintain my ratings in the Google Play store without creating a "new" app. Is there some way to mark my app in a way that forces a new install on all previous versions instead of upgrading it?

Johann
  • 27,536
  • 39
  • 165
  • 279

1 Answers1

0

No, there is no way to do this. You should be able to perform the test by installing the original version on the emulator, putting in some data that your app uses, i.e. set it up how a user of the app might use it. Then run adb install -r . This will update the app retaining the app data.

You would have to put some logic in to cope with the upgrade, i.e. checking preferences, upgrade databases, etc. Getting the user to uninstall and then re-install and will likely annoy users as they will have to enter in all the details again.

But what you're asking, there is no way to do this. An alternative, although I still wouldn't suggest this method, is when the user launches the app for the first time after the upgrade, the app, clears the shared preferences and deletes the database, and then you re-create the database again and the app will be like first use.

Hope this helps

Boardy
  • 35,417
  • 104
  • 256
  • 447