Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to store user data?

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.

like image 862
a3dsfcv Avatar asked Nov 26 '25 02:11

a3dsfcv


1 Answers

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.

like image 79
Rockney Avatar answered Nov 27 '25 15:11

Rockney



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!