1

I have an Android app on the Google Play. I have made big changes, so I want users to have a clean install of my app. If I change my app signature (= different keystore and new key), how it will look like, when former android user of my app installs this newer version? Will be the older version of my app first properly and automaticaly uninstalled in the background and then my new version of an app will be installed?

Thx

Maarten Bodewes
  • 90,524
  • 13
  • 150
  • 263
Waypoint
  • 17,283
  • 39
  • 116
  • 170
  • use the same keystore to sign your apk which you have used for your last upload. Then automatically play store will take care of the update and installation for the user – Lochana Ragupathy Mar 17 '15 at 13:06
  • 1
    You can't change the key you used to sign any previous versions - Google Play will reject any uploads which aren't signed with the same key. Just increment the version number and sign with the same key and upload it. Existing users will get an upgrade to the new version although any data previously saved with the earlier versions will be retained. – Squonk Mar 17 '15 at 13:09
  • possible duplicate of [Anyway to change Keystore or Keystore's Info on android without publish new app](http://stackoverflow.com/questions/18357909/anyway-to-change-keystore-or-keystores-info-on-android-without-publish-new-app) – Jared Burrows Mar 17 '15 at 13:13

1 Answers1

4

Your package name is unique. So if you want to change the keystore you will have to change the package name. If you change the package name Google Play won't know the apps are related, so nothing will be deleted. Google Play also won't accept your apk with the same package name if it isn't signed with the same keystore as the old upload.
To be clear: to use your existing PlayStore entry you need to use the same package name and the same keystore.
Afaik there is no possibility to automatically uninstall your app. You could try to wipe your data when starting the updated app. I would rather do that than force the user to download a new app, since not all of your users will do that.
See this or even better that for reference on how to delete your data.

What happens if you just update your app? Well, all of your code is replaced. It really is a reinstall of your app. However, only the code is deleted and reinstalled. Sharedpreferences (which are just some xml files android stores for you), downloaded and stored files etc. won't be deleted. Thats where you should delete the data. Delete the directories you created in order to save files. Nullify your SharedPreferences. But keep in mind that users won't like it if appdata is reset. Let them keep at least their logindata if possible.

Community
  • 1
  • 1
tritop
  • 1,655
  • 2
  • 18
  • 30