if (intent.getAction().equals(SECRET_CODE_ACTION)) { Intent i = new Intent(Intent.ACTION_MAIN); i.setClass(context, TestingSettings.class); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(i); }