What is this offering from Android?
One Tablet used by multiple users – How can we shield users from seeing each other stuff. Jelly Bean has an answer to it.
Just like Windows OS, several user profiles (accounts) can be created on Android from Jelly Bean 4.2 (Tablets only) and onwards versions. This feature abstracts data between users. See the possible use cases / situations below:
Situation (At Home) – Parents and children share the same Tablet. Parents can create profiles and allow their children to see only those things that parents would like to. That is great!
Situation (At Business) – Stewards in restaurants are taking orders from clients by using application on Tablet. Admin (say Restaurant Manager) can create profiles for stewards and allow only work related applications to be available to stewards.
I am sure there will be many more situations applicable..
How these multiple profiles are created?
A profile is created when Tablet is started for the first time. This is the owner.
Owner will create multiple users. There are two types of users that can be created:
New AND User with Restricted Profile. Let us see them one by one.
User 1 (owner) is creating a New User
User 2 (New) is created. – This user will start fresh as if the owner would start. Will have its own app and content.
Now, let us create User 3 with Restricted Profile.
User 3 is created. Will only see apps that were allowed. Play store app is shown but, when launched, will prompt the user that permission is not there.
Switch users from Lock Screen and manage them from Settings > User screen
Something for App Developers
1. Application data is not shared with users. While saving files on Multiple user environment do not use hard-coded paths to directories. Instead use following:
– For access to internal storage, use getFilesDir(), getCacheDir(), or openFileOutput().
– For access to external storage, use getExternalFilesDir() or getExternalStoragePublicDirectory().
2. While saving data in Shared Preferences you NEED NOT to take care of user. System automatically manages by having separate Shared Preferences for each user.
3. Additionally, UserManager and UserHandle classes are provided to manage several users but very limited function of these classes are allowed. UserManager class can be used to check restrictions on user using getUserRestrictions() function.