Thanks to user370305 even if I already visited
http://developer.android.com/about/versions/android-4.3.html#RestrictedProfiles
I would like to improve it with a link using
https://www.youtube.com/watch?v=pdUcANNm72o
Limited profiles is a new feature introduced in Android Jelly Bean 4.3, which allows users to improve application management when sharing their tablet.
These limited profiles use the application, google account, the main user account, but in a limited way. They do not get access to gmail, game store, calendar, etc. The primary user can select restrictions for each application.
The UserManager class has been extended to manage these restrictions.
UserManager.getUserRestrictions returns user restrictions imposed by the user
UserManager.getApplicationRestrictions returns a package containing any saved application restrictions for this user for the given package name. This method can only call an application with this package name.
If you need specific settings, use this intent filter
<receiver android:name="GetRestrictionsReceiver"> <intent-filter> <action android:name="android.intent.action.GET_RESTRICTION_ENTRIES "/> </intent-filter> </receiver>
now implements a broadcast receiver with a list of restrictions list, as shown
public class GetRestrictionsReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) {
RestrictionEntry
Any application that wants to expose such restrictions does this by implementing a receiver that processes the ACTION_GET_RESTRICTION_ENTRIES action. The recipient then returns a result set containing an entry called "constraints" whose value is an ArrayList.
There are 3 types of restriction entries
- Boolean
- Single choice
- Several variants
You can use different RestrictionEntry methods to set and get different types of restrictions.
To access an account from a restricted profile, you must add the android: limitedAccountType attribute to the tag:
<application ... android:restrictedAccountType="com.example.account.type" >