openInNewTab

abstract fun openInNewTab(context: Context, url: String, sourceTabId: String? = null): Intent

Returns an Intent that opens url in a new browser tab.

Parameters

context

used to build the Intent.

url

the URL to open in the new tab.

sourceTabId

When provided, the new tab is anchored to sourceTabId, so closing the new tab returns to that tab instead of leaving an orphan tab.