Request Data Backup: Alternative to GPG Cloud Save Support (as a stopgap)

Status
Not open for further replies.

jaredmorgs

Moderator
Staff member
May 8, 2012
4,334
3
Hi there [MENTION=4573]Scumble373[/MENTION]

In my relentless pursuit to get saved_data synchronized with other owned devices, I came across http://developer.android.com/guide/topics/data/backup.html

As far as I can tell, this native function is not configured in the TPA Android build. This solution may be a good stopgap to consider while GPG support is being negotiated (or vetoed). It should not be considered a replacement for GPG Cloud Save, because the service is not able to be called "on demand".

Most Android users opt to have their Android App state data backed up when they set their device up. Implementing this solution would at least prevent folks losing all their achievements when they have to factory reset their device, or transfer the game onto another device (for example, when a user upgrades from a phone to a tablet)

I think if you made a point in the What's New section that this is how your game achievements are synchronized, folks could then opt into the service if they haven't already done so.

I would think a sync every 12hrs would be perfectly acceptable, and should capture most events where folks earn a new Standard or Wizard goal during the course of play.
 

jaredmorgs

Moderator
Staff member
May 8, 2012
4,334
3
This issue has been acknowledged by farsight support team, and has been passed onto [MENTION=4573]Scumble373[/MENTION] (I assume). This would have really helped [MENTION=3897]MOO[/MENTION] recently with his Nexus 7 catastrophic failure, and would have meant his achievement data was preserved.
 

jaredmorgs

Moderator
Staff member
May 8, 2012
4,334
3
Ping [MENTION=4573]Scumble373[/MENTION] is this moving forward at all or has conflicting priorities pushed this to the backburner again.
 

Scumble373

FarSight Employee
Jul 1, 2014
252
0
Hey Jared,

Recently, I have been doing a lot of research on data storage on android, and think I may have a solution for saving out high scores / goals / other things you want saved.

From what I've found, the cloud may not be the best way of doing things, however, by using a sqlite database and an SD card, I may be able to preserve these achievements in the case of a device meltdown. Here's how it would work:

- Every time you start the game, the application would look for the database in internal storage (checking for if you've played the game on this device before)
- If so, it would restore from the database, and populate the app with the variables
- If not, it would look for a database on the sd card
- If there is a database on the sd card, it would read from that and copy it over to internal storage, and the process would repeat
- If not, we can assume that this person has never played TPA on any device.

With this system in place, one could want to switch devices or have a device meltdown, and simply remove the SD card and insert it into their new device, launch the game, and have all of their high scores and achievements.

I have been toying with this idea for a while, and even have the basic framework laid out, however, getting this system fully functioning will take time, especially with the extra workload I've had recently.

Just wanted to fill you in on where i'm at. I'll keep you posted with any updates I have.
 

Indy99

Member
May 24, 2013
115
0
This is good news that this is being looked into. Not having a good solution for backing up this data is a huge gap for Android. That said, to me, this sounds much inferiror to a proper cloud based system for backups. Two of the biggest problems I see with this would be not everyone uses SD cards. Some devices (most notably Nexus devices) do not use an SD card. The other would be for people playing on multiple devices, such as a phone or tablet. It would be really nice to have your scores and achievements all there regardless if you are playing on your phone or your tablet.

If this is just a temporary stop-gap, that is fine. Persoanlly, I would rather not spend time with this solution and work towards a cohesive cloud based setup using GooglePlay Clould services.

But I am happy this is at least being looked at!
 

eckless

New member
Sep 11, 2012
76
0
Scumble - let me take you through a scenario. I have a phone and a tablet. Both are "up to date" with my wizard goal progression. I finish the Theater of Magic wizard mode on my tablet.

What I currently do is copy my saved_data to my google Drive. Then go to my phone, download from Drive, and then copy to the /data area of my phone. This is what requires root access currently.

If you could even add an "import" and "export" functionality to save the saved_data file to my /sdcard/Download or whatever, that would solve quite a few problems. Again automatic cloud saving is the perfect solution so everything syncs up auto-magically, but at least this way root access is not required.
 
Last edited:

Scumble373

FarSight Employee
Jul 1, 2014
252
0
Personally, from my limited experience of working with the cloud, I wasn't very impressed. For some reason, backups can't be forced, they happened at an opportune time in the future. Here is a quote from the android developer webpage:

"This call notifies the backup manager that there is data ready to be backed up to the cloud. At some point in the future, the backup manager then calls your backup agent's onBackup() method. You can make the call whenever your data has changed, without having to worry about causing excessive network activity. If you request a backup twice before a backup occurs, the backup only occurs once."

When trying this, it took a while for the backup to occur. When backing up with a database, it happens instantly. Don't get me wrong, the cloud seems like a very viable option, and I will definitely look into it further.

I really like the idea of moving things to an SD card, whether it be a file, or a database. All things will be considered, I want to pick the option that is best for everyone.

Thank you for your help guys.
 

Pete

New member
Jul 16, 2012
564
1
Ive gone through 4 android devices since pinball arcade started and it is really frustrating to have to start all over on the goals every time can't wait till this is sorted out
 

jaredmorgs

Moderator
Staff member
May 8, 2012
4,334
3
Personally, from my limited experience of working with the cloud, I wasn't very impressed. For some reason, backups can't be forced, they happened at an opportune time in the future. Here is a quote from the android developer webpage:

"This call notifies the backup manager that there is data ready to be backed up to the cloud. At some point in the future, the backup manager then calls your backup agent's onBackup() method. You can make the call whenever your data has changed, without having to worry about causing excessive network activity. If you request a backup twice before a backup occurs, the backup only occurs once."

When trying this, it took a while for the backup to occur. When backing up with a database, it happens instantly. Don't get me wrong, the cloud seems like a very viable option, and I will definitely look into it further.

I really like the idea of moving things to an SD card, whether it be a file, or a database. All things will be considered, I want to pick the option that is best for everyone.

Thank you for your help guys.

So there are two back-up methods currently supported by Google.

Google Play Games Cloud Save

Android Data Backup - Backup API

What you're describing here is the Backup API (I've read the dev docs and recognized the methods you're quoting). ;)

I may be putting words in other folks mouths here, but I think having TPA back-up even every 12 Hours would be better than never.

Using a SDCARD solution, moving forward, would not be a good design decision because fewer and fewer devices support an external SD slot.

The only caveat I can see with Backup API is how would the API detect data freshness. That is, in the case where someone is playing TPA on a Tablet and Phone. Say someone earns a goal on their tablet. Then switches over to their phone and earns a goal on their phone on another table. When the API calls the dataChanged() method on both devices and uploads to the Backup server, how does the data get merged into the master record.

I think you might be trying to use an API beyond it's capabilities here. I would strongly suggest just plugging into the already established Google Cloud Save service and the Google Cloud Datastore.
 

Scumble373

FarSight Employee
Jul 1, 2014
252
0
So there are two back-up methods currently supported by Google.

Google Play Games Cloud Save

Android Data Backup - Backup API

What you're describing here is the Backup API (I've read the dev docs and recognized the methods you're quoting). ;)

I may be putting words in other folks mouths here, but I think having TPA back-up even every 12 Hours would be better than never.

Using a SDCARD solution, moving forward, would not be a good design decision because fewer and fewer devices support an external SD slot.

The only caveat I can see with Backup API is how would the API detect data freshness. That is, in the case where someone is playing TPA on a Tablet and Phone. Say someone earns a goal on their tablet. Then switches over to their phone and earns a goal on their phone on another table. When the API calls the dataChanged() method on both devices and uploads to the Backup server, how does the data get merged into the master record.

I think you might be trying to use an API beyond it's capabilities here. I would strongly suggest just plugging into the already established Google Cloud Save service and the Google Cloud Datastore.

Aha... this is interesting. Thanks Jared, I will definitely look into this. Really looking forward to releasing Ghostbusters so I can put more focus back on TPA. When that happens, this will be high up on the priority list.
 

Mapa

New member
May 16, 2012
43
0
Hi, just checking in to see if any progress is made on this topic :).

I'd also like to weigh in in the SD solution, none of my devices have SD slots, so that would not be a big help for me. I can however conceive the location of the savedata-file is configurable somehow, so I can make Google Drive sync it upon connection.

One challenge I can think of, is that on different devices, I might achieve different goals. Rather than just overwriting the progress, it should sync it (take highscores from one device, take standard goal from another and take two wizard goals from the last and combine it. I guess this would require slightly more than just copying around the savedata file.

I was wondering, why can't we think of a solution that does not rely on any external factors, rather it stores the progress (just like leaderboard scores and stuff) on Farcry servers. I mean, isn't that how the iOS solution now is working too? It would only require me to log on to Farcry from time to time. It could even work cross-platform (keep progress synced between my Android phone and iPad).
 
Last edited:

jaredmorgs

Moderator
Staff member
May 8, 2012
4,334
3
Hi, just checking in to see if any progress is made on this topic :).

I'd also like to weigh in in the SD solution, none of my devices have SD slots, so that would not be a big help for me. I can however conceive the location of the savedata-file is configurable somehow, so I can make Google Drive sync it upon connection.

One challenge I can think of, is that on different devices, I might achieve different goals. Rather than just overwriting the progress, it should sync it (take highscores from one device, take standard goal from another and take two wizard goals from the last and combine it. I guess this would require slightly more than just copying around the savedata file.

I was wondering, why can't we think of a solution that does not rely on any external factors, rather it stores the progress (just like leaderboard scores and stuff) on Farcry servers. I mean, isn't that how the iOS solution now is working too? It would only require me to log on to Farcry from time to time. It could even work cross-platform (keep progress synced between my Android phone and iPad).
See the "cool stuff coming" thread for more up to date details.
 

jaredmorgs

Moderator
Staff member
May 8, 2012
4,334
3
Also, [MENTION=4573]Scumble373[/MENTION] is abandoning the Data Backup API idea to implement what looks like full-blown Google Play Games Framework support (the correct, longer term approach).
 
Status
Not open for further replies.

Members online

No members online now.

Members online

No members online now.
Top