Skip to content

Commit c586b7b

Browse files
fix(rtn-web-browser): prevent CustomTab to show in recent used app (#13847)
prevent CustomTab to show in recent used app. Co-authored-by: Hui Zhao <[email protected]>
1 parent b26e719 commit c586b7b

File tree

1 file changed

+1
-0
lines changed
  • packages/rtn-web-browser/android/src/main/kotlin/com/amazonaws/amplify/rtnwebbrowser

1 file changed

+1
-0
lines changed

packages/rtn-web-browser/android/src/main/kotlin/com/amazonaws/amplify/rtnwebbrowser/WebBrowserModule.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class WebBrowserModule(
4444
getCustomTabsPackageName(reactApplicationContext)?.let {
4545
val customTabsIntent = CustomTabsIntent.Builder(connection?.getSession()).build()
4646
customTabsIntent.intent.setPackage(it).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
47+
customTabsIntent.intent.setPackage(it).addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS)
4748
customTabsIntent.launchUrl(reactApplicationContext, Uri.parse(uriStr))
4849
} ?: run {
4950
promise.reject(Throwable("No eligible browser found on device"))

0 commit comments

Comments
 (0)