1

I am trying to open URL in browser in same tab. Instead of creating new tab(for same URL) of each click on android app.

Hers's is the code:

Intent intent = new Intent(Intent.ACTION_VIEW,Uri.parse("http://1.1.1.1:8008"));
intent.putExtra(Browser.EXTRA_APPLICATION_ID, "com.android.browser");
startActivity(intent);

If I close the browser and again restart the application I see URL opened in new tab, instead of open using existing tab.

yogesh10
  • 319
  • 2
  • 12

1 Answers1

0

There are many Web browsers available for Android. Whether a browser even offers tabs to the user is up to the developers of the browser. For those that do offer tabs, how the browser handles ACTION_VIEW requests with respect to those tabs is also up to the developers of the browser.

There is nothing in the standard ACTION_VIEW protocol to say "please put this in an existing tab", largely because few things that support ACTION_VIEW have tabs.

It is certainly possible that some browsers offer some extra to control tab behavior with respect to ACTION_VIEW. You are welcome to contact the developers of those browsers and ask them.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491