I experience a very strange problem.
From the MainActivity of my app, by clicking on one of my menu button, a new screen / fragment called MyFragment is loaded. On the MyFragment screen there is a button called MyButton. If the MyButton button is clicked, it opens a link on a browser. The problem is that, from the browser, if I click on the Back device button, the behavior is very different depending on the device I test the app (and you will all agree it should NOT) :
on a Samsung Galaxy Tab 2 tablet, the app gets back to its previous state, with the MyFragment loaded and opened (just as if nothing changed from the moment when I clicked on MyButton).
on a Nexus 4 phone, the app is like reset (and then the MyFragment is not loaded). Basically the previous state is lost.
Any idea ?
Here is the piece of code I call from the MyButton click event.
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse("http://www.example.com"));
i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); // I tried this but no luck
startActivity(i);
Thanks in advance.