0

Is there any way to determine if there are other users installed on the device or if the device is being used a single user tablet?

Along those lines is it possible to get the name, id, or Google account of the current user?

John Verrone
  • 307
  • 3
  • 16

2 Answers2

0

To answer your second question, this code will return all the Google accounts of the current user:

    AccountManager manager = AccountManager.get(context);
    Account[] accounts = manager.getAccountsByType("com.google");

You will also need this permission in your manifest:

    <uses-permission android:name="android.permission.GET_ACCOUNTS" /
Barry Fruitman
  • 12,316
  • 13
  • 72
  • 135
0

For account information see the AccountManager class. This should show you the accounts on the device and allow you to determine other users, etc.

For details, check out the following post (and others like it...):

How do I retrieve the logged in Google account on android phones?

Community
  • 1
  • 1
Daniel Smith
  • 8,561
  • 3
  • 35
  • 58