From 405f172a57b38e1f85f6d79cc99c237359359879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20B=C3=B8e=20Svendsen?= Date: Wed, 16 Aug 2017 12:53:46 +0200 Subject: [PATCH] naively adding flags according to SO solution --- .../android/reactnative/customtabs/CustomTabsModule.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/android/src/main/java/com/github/droibit/android/reactnative/customtabs/CustomTabsModule.java b/android/src/main/java/com/github/droibit/android/reactnative/customtabs/CustomTabsModule.java index 738552c..2d1e942 100644 --- a/android/src/main/java/com/github/droibit/android/reactnative/customtabs/CustomTabsModule.java +++ b/android/src/main/java/com/github/droibit/android/reactnative/customtabs/CustomTabsModule.java @@ -3,6 +3,7 @@ import android.app.Activity; import android.content.Context; import android.graphics.Color; +import android.content.Intent; import android.os.Bundle; import android.provider.Browser; import android.support.customtabs.CustomTabsIntent; @@ -159,6 +160,8 @@ public void openURL(String url, ReadableMap option, Promise promise) { } } CustomTabsIntent customTabsIntent = builder.build(); + customTabsIntent.intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); + customTabsIntent.intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // Add custom headers if present if (option.hasKey(KEY_HEADERS)) {