Reputation: 6839
I want to programatically redirect to device adminstrators settings activity . I am able to redirect user to security settings using intent flags but i want to redirect to device adminstrators settings. Can anyone help ?
Upvotes: 2
Views: 967
Reputation: 31
adb -s emulator-5554 wait-for-device shell am start -W -S -N -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "com.android.settings/.DeviceAdminSettings"
This will directly take you to the device admin app menu screen of your Android device.
Upvotes: 3
Reputation: 1516
To improve on the above answer
Intent intent = new Intent();
intent.setComponent(new ComponentName("com.android.settings", "com.android.settings.DeviceAdminSettings"));
startActivity(intent);
Upvotes: 9