Is there any chance to get switched(active) account ID in android(L) multi user. Secure.getString(getContentResolver(),Secure.ANDROID_ID) this one returning first owner android ID as well as user android ID. if user is in active account. I want only active accountid/android
Asked
Active
Viewed 573 times
1
-
Use AccountManager class .http://developer.android.com/reference/android/accounts/AccountManager.html – IntelliJ Amiya Jul 22 '15 at 07:56
1 Answers
3
This class provides access to all registered user accounts in device. AccountManager generates the auth tokens for different applications and caches it. It is also responsible for periodic check for the validity of auth tokens.
Please go through below Link. Hope this helps you .

IntelliJ Amiya
- 74,896
- 15
- 165
- 198
-
1getaccounts() returns all accounts. I want only active account which is in front. which user that is using right now. not all accounts. – user3860944 Jul 22 '15 at 09:35