From 6e18699dd517ad1d2b36840f64282f3bb8852553 Mon Sep 17 00:00:00 2001 From: savy91 Date: Mon, 19 Apr 2021 17:51:24 +0200 Subject: [PATCH] Make sure that when we want to open a new instance of a custom chrome tab, we are opening a new instance with the provided url and not an old instance. --- android/src/main/AndroidManifest.xml | 4 +++- .../ChromeSafariBrowserManager.java | 3 +++ .../android/chrome_custom_tabs_options.dart | 11 +++++++++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index 40dc1267..daff949a 100755 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -8,7 +8,9 @@ android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density" /> + android:name="com.pichillilorenzo.flutter_inappwebview.chrome_custom_tabs.ChromeCustomTabsActivity" + android:launchMode="singleInstance" + /> toMap() { @@ -53,7 +58,8 @@ class AndroidChromeCustomTabsOptions "enableUrlBarHiding": enableUrlBarHiding, "instantAppsEnabled": instantAppsEnabled, "packageName": packageName, - "keepAliveEnabled": keepAliveEnabled + "keepAliveEnabled": keepAliveEnabled, + "noHistory": noHistory }; } @@ -68,6 +74,7 @@ class AndroidChromeCustomTabsOptions options.instantAppsEnabled = map["instantAppsEnabled"]; options.packageName = map["packageName"]; options.keepAliveEnabled = map["keepAliveEnabled"]; + options.noHistory = map["noHistory"]; return options; }