Keeping saved data between "demo" and full version of a game

Hello,

I’m new to Android development, and was wondering how you can keep the saved data from a “demo” version of a game, and a fully purchased one. Is there something in the key you use that keeps it together, or you have to save to an external file (meaning no PlayerPrefs)?

Thanks for any help

Daniele

If the demo and fully purchased version have the same bundle ID, then updating from one to the other would keep save data, I believe. If your app is using the WRITE_EXTERNAL_STORAGE permission, you could also write to a location on the SD Card and then grab the data from your full version. Writing data to the SD card would allow you save a data file in the demo and retrieve it in the full version.

However, writing data to external storage can be a real can of worms. Your data is available to be viewed by anyone who attaches their device to their system with USB mass storage. And if the SD card is unavailable for some reason, it may appear to players that they have lost data. And if your full version reads data off of external storage to retain save data, someone could modify the data on the SD card to get things they didn’t actually earn in-game. Fraught with peril I tell you!

Thanks a lot for the insight kromenak, I didn’t know I could use the same bundle ID for two different applications. And seen all the perils you pointed at, I will definitely use PlayerPrefs to store the saved data :slight_smile:

Yeah, if you use the same bundle ID for two different apps, you can trick the OS into thinking that one is just an upgrade for the other - but you’d probably only want to do this for an app that is meant to replace another app.

Actually, the Nook marketplace uses this trick for upgrading from their “Trial Version” to the “Full Version”. Both versions are required to have the same bundle ID so that users will only have the trial version or the full version, and so that data can be saved between the two. It is helpful to solve the problem that you mention with demo and full versions, but I don’t think other markets handle this situation as gracefully.

Uhm, now I’m getting worried about the other markets. Same bundle ID looks the perfect solution, I wonder why other markets might not like it, since they check the submitted content anyway (they do, right?). I suppose I will have to give it a try, and thanks a lot for the additional infos :slight_smile:

If you use the same bundle id, what happens when you give people your market link? Which app come up?
Or maybe I am not understanding what is being said…