In order to open SIM PIN settings, I am using this code up to Android M. 7.0 SDK 24, Sim is inside the tray. ^^
Intent intent = new Intent(Intent.ACTION_MAIN);
ComponentName cn = new ComponentName("com.android.settings","com.android.settings.IccLockSettings");
intent.setAction("android.intent.action.VIEW");
intent.setComponent(cn);
startActivity(intent);
On Android N, I am getting à android.content.ActivityNotFoundException
Any Clue ?
Instead of
"com.android.settings.IccLockSettings"
try"$IccLockSettingsActivity"
If you use adb, don't forget to escape the
$
wth a\
: