Use BackupAgent http://developer.android.com/guide/topics/data/backup.html to save settings between updates, reinstalls, etc.
I've started working on this in my backup-agent branch but I've run into three small issues:
In order to use the Android Backup Service, the app needs a service key: http://code.google.com/android/backup/signup.html
According to the terms and conditions of the Android Backup Service: "4.11 You agree that you and your Applications will not transmit or store sensitive user information, such as user names, passwords, or credit card numbers, through the Service." Personally, I wouldn't consider the user's reddit username and session token as sensitive as a credit card number or username\password combo. Even so, we need to decide whether to include this information or not.
Also according to the terms and conditions: "If the user has not given you permission to back up information to the Service, you may not transmit such information to the Service." So, we need to decide how to give the user the option.
#68: add BackupAgent api key for package com.andrewshu.android.reddit
Hey there thanks a lot for taking a look at this.
I just added the API key in master; if you pull latest version you'll see it in AndroidManifest.xml
We shouldn't back up usernames or session tokens. Just user preferences.
I think the best option is just a highly visible preference, i.e. near the top of the prefs page. The Backup Service likely applies to users who actually access the Settings page, so there's no need to do a prompt on startup or try other aggressive means to gain user adoption. Even if existing users don't immediately see the new setting, once they install the app on a new device and go to the Settings page, they'll see it, and they won't have to worry about it for subsequent devices after that.
I'd like some feedback on the SettingsBackupHelper. Do you know of a better way to exclude the user's credentials?