I agree with @Kaediil that Android apps should work well, and the βDo not save actionsβ option is checked.
Boo for some reason, if you need to check the value of "alwaysFinishActivities", you can use the code below;
private boolean isAlwaysFinishActivitiesOptionEnabled() { int alwaysFinishActivitiesInt = 0; if (Build.VERSION.SDK_INT >= 17) { alwaysFinishActivitiesInt = Settings.System.getInt(getApplicationContext().getContentResolver(), Settings.Global.ALWAYS_FINISH_ACTIVITIES, 0); } else { alwaysFinishActivitiesInt = Settings.System.getInt(getApplicationContext().getContentResolver(), Settings.System.ALWAYS_FINISH_ACTIVITIES, 0); } if (alwaysFinishActivitiesInt == 1) { return true; } else { return false; } }
If the alwaysFinishActivities option is checked and you want to remove it,
You can direct the user to "Settings β Developer Options" to remove this value. (This is better than getting extra scary permissions and setting this value programmatically)
private void showDeveloperOptionsScreen(){ Intent intent = new Intent(android.provider.Settings.ACTION_APPLICATION_DEVELOPMENT_SETTINGS); intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); startActivity(intent); }
Devrim Apr 12 '13 at 7:11 2013-04-12 07:11
source share