Account Settings in Android 2.2 for an account, not an account type

I am developing an Android application and have one account authenticator with settings. But when I add two accounts of my type, then preferences are distributed between them. How to define parameters so that they can be set for each account separately?

Thanks in advance!

Przemyk

+4
source share
1 answer

Do not use Preferences for this purpose!

You should use AccountManager.setUserData() and AccountManager.getUserData() to store your things; this makes your settings safe (the AccountManager stores it), and you pass the Account , so everything is coordinated correctly, and all financial statements are executed when the user deletes accounts.

+1
source

Source: https://habr.com/ru/post/1315066/


All Articles