Merge branch 'sungazer-io-master' into develop
This commit is contained in:
commit
104eeab1cd
|
@ -72,6 +72,9 @@ public class ChromeSafariBrowserManager implements MethodChannel.MethodCallHandl
|
||||||
if (CustomTabActivityHelper.isAvailable(activity)) {
|
if (CustomTabActivityHelper.isAvailable(activity)) {
|
||||||
intent = new Intent(activity, !isSingleInstance ? ChromeCustomTabsActivity.class : ChromeCustomTabsActivitySingleInstance.class);
|
intent = new Intent(activity, !isSingleInstance ? ChromeCustomTabsActivity.class : ChromeCustomTabsActivitySingleInstance.class);
|
||||||
intent.putExtras(extras);
|
intent.putExtras(extras);
|
||||||
|
if ((Boolean) options.get("noHistory")) {
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
|
||||||
|
}
|
||||||
activity.startActivity(intent);
|
activity.startActivity(intent);
|
||||||
result.success(true);
|
result.success(true);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -38,6 +38,9 @@ class AndroidChromeCustomTabsOptions
|
||||||
///Set to `true` to launch the Android activity in `singleInstance` mode. The default value is `false`.
|
///Set to `true` to launch the Android activity in `singleInstance` mode. The default value is `false`.
|
||||||
bool singleInstance;
|
bool singleInstance;
|
||||||
|
|
||||||
|
///Set to `true` to launch the Android intent with the flag `FLAG_ACTIVITY_NO_HISTORY`. The default value is `false`.
|
||||||
|
bool noHistory;
|
||||||
|
|
||||||
AndroidChromeCustomTabsOptions(
|
AndroidChromeCustomTabsOptions(
|
||||||
{this.addDefaultShareMenuItem = true,
|
{this.addDefaultShareMenuItem = true,
|
||||||
this.showTitle = true,
|
this.showTitle = true,
|
||||||
|
@ -46,7 +49,8 @@ class AndroidChromeCustomTabsOptions
|
||||||
this.instantAppsEnabled = false,
|
this.instantAppsEnabled = false,
|
||||||
this.packageName,
|
this.packageName,
|
||||||
this.keepAliveEnabled = false,
|
this.keepAliveEnabled = false,
|
||||||
this.singleInstance = false});
|
this.singleInstance = false,
|
||||||
|
this.noHistory = false});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Map<String, dynamic> toMap() {
|
Map<String, dynamic> toMap() {
|
||||||
|
@ -58,7 +62,8 @@ class AndroidChromeCustomTabsOptions
|
||||||
"instantAppsEnabled": instantAppsEnabled,
|
"instantAppsEnabled": instantAppsEnabled,
|
||||||
"packageName": packageName,
|
"packageName": packageName,
|
||||||
"keepAliveEnabled": keepAliveEnabled,
|
"keepAliveEnabled": keepAliveEnabled,
|
||||||
"singleInstance": singleInstance
|
"singleInstance": singleInstance,
|
||||||
|
"noHistory": noHistory
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,6 +79,7 @@ class AndroidChromeCustomTabsOptions
|
||||||
options.packageName = map["packageName"];
|
options.packageName = map["packageName"];
|
||||||
options.keepAliveEnabled = map["keepAliveEnabled"];
|
options.keepAliveEnabled = map["keepAliveEnabled"];
|
||||||
options.singleInstance = map["singleInstance"];
|
options.singleInstance = map["singleInstance"];
|
||||||
|
options.noHistory = map["noHistory"];
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue