How do I check if an activity is running already and if so, restart the activity?
Currently, I'm using this code to start the activity. However, if the activity NewActivity is already running, I would like to restart it (or send a broadcast)?
Intent intent = new Intent(this, NewActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.putExtra(EXTRA_STRING, true);
startActivity(intent);
return;