Search code examples
androidsqlitegoogle-drive-android-apiandroid-backup-service

Best way to backup app data with google drive?


So I have an app that I've written that's using sqlite (so has a db in the data folder) and about 12-50MBs worth of server and user generated content. I need to automatically back this up for the users in such a way that when they move devices/get new devices all their changes and content auto-magically come over with them. Now if it keeps all the current devices synced together that's bonus, but not a requirement.

What is the best way to do this?

I've looked at backup agent, but that seems to be only semi-supported on some devices and looks like if you were going to from say a verizon device to a say sprint device you would just lose everything (but I may be misunderstanding how it works).

I've also been looking at google drive through play services, but despite the docs making it sound like I could just get access to the appFolder and just move/store everything there, in practice I can't seem to find a simple way to do this. Do I really have to loop over every single file manually uploading it? I can do this if this is the best solution, but I thought before I put 12-15hours of work into it it would be best to ask here if that's my best solution.

Thanks for any input!

TL;DR

What's the simplest cloud backup solution that isn't network dependent and doesn't require anything more then a google account for the end user?


Solution

  • one of the best approach is to use Android Backup Service check from here