3

I'm developing an Android application, and I want to restore user settings, when my application will be installed on another phone by the same user.

I don't want to use Dropbox or Google drive, because not all the users have account in these clouds. Id like to use something, that all Android users have. Some cloud linked to google account? But I can't found any.

There should be pretty common solution but I haven't found any information about it.

a3dsfcv
  • 1,146
  • 2
  • 20
  • 35
  • I would look at a saas option like firebase or aws datasync. – Ge3ng Mar 15 '19 at 19:41
  • Every Google/Gmail account has associated Google Drive. That's why it is the preferred method of backing up app data and settings for the majority of apps. See: https://developer.android.com/guide/topics/data/backup Another option is to use Firebase or any mobile cloud service to store user settings and data which can be accessed by users after proper authentication. Firebase (https://firebase.google.com/) is preferred as its offered by Google and integrates well with Google account authentication. – MD Naseem Ashraf Mar 15 '19 at 19:42

1 Answers1

6

For Android 6.0 and newer you can use auto backup. It backups the SharedPreferences and other data stored in your applicationsdirectory up to 25mb. Apps targeting Android 6.0 are automatically using auto backup. You can change this behaviour.

For older versions you can use key-value backup. This is perfect for preferences.

Rockney
  • 10,380
  • 2
  • 20
  • 26
  • About autobackup: If the user owns two devices, then a backup dataset exists for each device. If the user factory resets a device and then sets up the device with the same account, the backup is stored in a new dataset This restrictions are critical for me – a3dsfcv Mar 31 '19 at 00:34