Let’s say I am on an Activity, user clicks a button, and I navigate to a web page.
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse("SOME_URL"));
startActivity(i);
it takes me to the web page, and then when I click back to goes to my activity, but it starts it all over again.
So is it possible to do this in a way so that after clicking the back button, it takes me to my activity, but instead of onCreate it call onRestart.
The goal is not going through onCreate again.
That is the normal life cycle of an Activity… you could save the state of the activity and restore it to get the “same” as before.
The main question should be: Why do you not want to go through onCreate? If it goes through it because it was destroyed before and need to be recreated. So not going through it will cause a lot of trouble.