question

Android avatar image
Android asked

Sharing Game Data

We are planning to release a series of games for the Kindle Fire. We would like to share data between the games so that, for example: - Progress in one game can be seen/used in another. - We are able to detect from one game whether other games in the series have been purchased. Should we use SharedPreferences for this? Or is there a better solution? Since the games will use the same engine, but different graphics/level data can we submit two different games that have the same main class? Is this correct?
fire tablet
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Jonathan, Thank you for your post. You should use WhisperSync feature of GameCircle to persist app data in cloud and share those across the apps. SharedPreferences could be a solution but it can save and share the data in a device locally. But you integrate WhisperSync in your apps, you can share the data (users progress in all the apps) across all the apps for an Amazon user registered in many devices. To do that you should create a security profile, and all of your apps should use that profile with different api keys what are created by registering the package names and the MD5 fingerprint of the certificates you are using to sign the apps. Please refer below links for better understanding of GameCircle features: https://developer.amazon.com/sdk/gamecircle.html https://developer.amazon.com/sdk/gamecircle/documentation/gamecircle-config.html https://developer.amazon.com/sdk/gamecircle/documentation/gamecircle-init.html https://developer.amazon.com/sdk/gamecircle/documentation/whispersync.html You could certainly submit 2 different apps that have have the same main class.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Amazon Customer avatar image
Amazon Customer answered
I am still a new developer, but my understanding is that SharedPreferences will not allow you to share data between applications (at least not currently). There were some discussions about that at StackOverflow, one of which pointed to the Android documentation for SharedPreference, which still warns that "currently this class does not support use across multiple processes. This will be added later."
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Amazon Customer avatar image
Amazon Customer answered
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi, I already recommended you to use WhisperSync feature of GameCircle to persist app data in cloud and share those across the apps.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.