Are PlayerPrefs deleted on application uninstall on Android device?

Hi the question as in the topic I have an application and I want to remove access token on application uninstall so it won’t autologin when opening the application that was uninstalled and then installed again.

I am pretty sure this is what is happening (it is not autodeleted) but I prefer to ask to be sure.

And the following question is how to add some code to the uninstallation process so I can ensure the certain player pref or even all of them are deleted once the application is uninstalled?

1 Like

If you have Android Auto backup on, then PlayerPrefs are returned when app is reinstalled (assuming that backup was done at least once).

AFAIK you cannot add any custom code to uninstall step.

Can I at least do it on the installation phase? I just literally need to add one line of code => DeleteAllPlaferPrefs.

Instead of “deleting” backed up data (which is not doable), you can simply make sure the data is not backed up in the cloud. You just have to set allowBackup to false in the manifest. See
https://developer.android.com/guide/topics/data/autobackup#EnablingAutoBackup for more information.

1 Like

hi, by setting allowBackup to false will it effect our game in anyway?

If player reinstalls the game, then it will be a fresh start.

What about version updates? Like if a new version is available on the store, and GP updates it for the user. Does anyone know if this will trigger a playerprefs clear?