This accepted answer to this question would probably help you...
What should I use Android AccountManager for?
It should also be pointed out, as mentioned in the above post and also in AccountManager without a SyncAdapter? , that you can't have an AccountManager
without a SyncAdapter
, so its probably not good to use this for your particular situation.
I can't see any reason to use an AccountManager
specifically for storing this type of information - at the end of the day, its no different to manually storing the data yourself in your own database or file. If anything, it probably complicates things - why don't you just store it in SharedPreferences
?
The only reason I could think of that would encourage the use of AccountManager
would be if you want to share your account across a number of different apps, as the data is stored in the central Android datastore which can be accessed by all apps. However, if this isn't required, I think its probably easier and simpler to just use SharedPreferences