How to apply app restriction on play store for android lollipop

1k views Asked by At

Like google chrome application, can we apply restriction to google play store app too? If anyone has tried it please reply with bundle structure for same.

Thanks in Advance!!!

2

There are 2 answers

1
Sud On

Please check below API to restrict chrome

final DevicePolicyManager manager =
            (DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE);
final Bundle settings = new Bundle();
settings.putString("EditBookmarksEnabled", "false");
settings.putString("IncognitoModeAvailability", "1");
settings.putString("ManagedBookmarks",
                   "[{\"name\": \"Chromium\", \"url\": \"http://chromium.org\"}, " +
                   "{\"name\": \"Google\", \"url\": \"https://www.google.com\"}]");
settings.putString("DefaultSearchProviderEnabled", "true");
settings.putString("DefaultSearchProviderName", "\"LMGTFY\"");
settings.putString("DefaultSearchProviderSearchURL",
        "\"any URL\"");
settings.putString("URLBlacklist", "[\"facebook.com\", \"example.org\"]");

Now you can use

manager.setApplicationRestrictions(BasicDeviceAdminReceiver.getComponentName(activity),
                                   packageName,
                                   settings);

to set restriction.

0
Fred On

The Google Play Store app does not expose any app restriction to configure.

To get the list of app restrictions that an app exposes you can either