Search code examples
androidunity-game-enginesaving-data

Unity Android: Keep save after deleting app?


I have created an app where you can unlock certain things and also you can buy them with real money. Because of this it would be a shame if a user loses all his unlocked things when removing the app.

At first I used PlayerPrefs, but that isn't safe for these kind of things I learned. Also PlayerPrefs get cleared when removing the app.

Then I found out how to serialize my data and save it to the "PersistentDataPath". This will be much safer, but it also gets cleared when removing the app.

Is there a way, besides working with a external server, in which I can store my players unlocked things and it won't get deleted when they remove the app? I also read something about the permission WRITE_EXTERNAL_STORAGE not allowing this.

I just want to avoid raging players who delete the app and reinstall it later and then figuring out everything they paid for is gone.

Thanks in advance lads!


Solution

  • You could use Google Play Games they have a "Saved Games" feature. That way the savegame will even survive when the user gets a new phone.

    https://developers.google.com/games/services/common/concepts/savedgames