Skip to content

Commit

Permalink
fix(rtn-web-browser): prevent CustomTab to show in recent used app (#…
Browse files Browse the repository at this point in the history
…13847)

prevent CustomTab to show in recent used app.

Co-authored-by: Hui Zhao <[email protected]>
  • Loading branch information
AnantTiwari001 and HuiSF authored Sep 27, 2024
1 parent b26e719 commit c586b7b
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class WebBrowserModule(
getCustomTabsPackageName(reactApplicationContext)?.let {
val customTabsIntent = CustomTabsIntent.Builder(connection?.getSession()).build()
customTabsIntent.intent.setPackage(it).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
customTabsIntent.intent.setPackage(it).addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS)
customTabsIntent.launchUrl(reactApplicationContext, Uri.parse(uriStr))
} ?: run {
promise.reject(Throwable("No eligible browser found on device"))
Expand Down

0 comments on commit c586b7b

Please sign in to comment.