I\'m trying to implement a button that will result in my app going back to the first activity and acting as if it was (almost) restarted all over. This code
Update
Google has removed the method IntentCompat.makeRestartActivityTask()
in current support library versions. Instead, you can just use the plain Android API:
ComponentName cn = intent.getComponent();
Intent.makeRestartActivityTask(cn);
I hope this can save someone time searching for alternatives ;)