Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
I've seen AccountManager in the Android SDK and that it is used for storing account information. Thus, I cannot find any general discussion of what it is intended for. Does anyone know of any helpful discussions of what the intention behind AccountManager is and what it buys you? Any opinions of what type of Accounts this is suitable for? Would this be where you'd put your user's account information for a general web service? | ||||
This question is a bit old, but I think it is still of good interest.
With
Bottom line: the framework
| ||||
From http://www.c99.org/2010/01/23/writing-an-android-sync-provider-part-1/:
| |||
The AccountManager class is integrated with your phone accounts. So if you follow all the guides and get it working correctly you'll see your accounts under the menu "Settings->accounts and synch". From there you can customize them or even delete them. Furthermore the accountManager has a cache of the authentication tickets for your accounts. This can be used also if you don't plan to synchronize your account (as far as i know). If you don't want your accounts to appear under that menu you shouldn't use the AccountManager and store the accounts data elsewhere (maybe in the shared preferences) http://developer.android.com/guide/topics/data/data-storage.html | |||
I will disagree with some of whats been written as I have implemented AccountManager without having to use SynchAdapter or a content provider. The password is saved encrypted SHA1-256 and account auth tokens are generated which are used to access a remote resource. Whatever implementation strategy you use, ensure you follow the tutorial and setup the xml preferences correctly. | |||
default
.
stackoverflow.comm
No comments:
Post a Comment