From 2b8de5bbf149315016370e9d51eeee510a3e74b8 Mon Sep 17 00:00:00 2001
From: Juan David Nicholls Cardona
Date: Fri, 25 Jun 2021 22:47:30 -0500
Subject: [PATCH 01/13] Fix README
---
CHANGELOG.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 66f510e..05aa8c5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -25,7 +25,7 @@ in case of vulnerabilities.
## [3.6.0] - 2021-06-25
### Added
-- Add `navigationBarColor` and `navigationBarDividerColor` by [@jdnichollsc](https://github.com/jdnichollsc).
+- Add `navigationBarColor` and `navigationBarDividerColor` options by [@jdnichollsc](https://github.com/jdnichollsc).
- Add try catch block to `Safari View Controller` logic by [@Opstrup](https://github.com/Opstrup) ([#216](https://github.com/proyecto26/react-native-inappbrowser/pull/216)).
### Fixed
From 8f96db20143939d174ce34659395ff1bc9e03807 Mon Sep 17 00:00:00 2001
From: Juan David Nicholls Cardona
Date: Fri, 25 Jun 2021 23:18:47 -0500
Subject: [PATCH 02/13] Add "Who is using InAppBrowser" section from README
---
README.md | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index ff2734f..efdfa29 100644
--- a/README.md
+++ b/README.md
@@ -33,14 +33,17 @@
-## Demo
+## Who is using InAppBrowser?
Do you want to see this package in action? Check these awesome projects, yay! 🎉
- [MyApp](https://github.com/proyecto26/MyApp) - A template to create awesome Apps easily ⚡️
- [OLIO](https://olioex.com) - Share more. Waste less.
- [Alpe Audio](https://www.alpeaudio.com) - Courses On The Go.
+- [VibePay](https://vibepay.com) - A simple, smarter, better way to get paid.
+- [Opinio](https://opinio.media) - allows the population to be surveyed on social issues.
+- [medpex: Online Apotheke](https://www.medpex.de) - Online pharmacy for medicines & cosmetics with over 5 million customers.
-Let us know about your awesome project [here](https://github.com/proyecto26/react-native-inappbrowser/issues/164)! ❤️
+Share your awesome project [here](https://github.com/proyecto26/react-native-inappbrowser/issues/164)! ❤️
## Getting started
From 68b9e287450163a9728d96fbca514f601b0076f7 Mon Sep 17 00:00:00 2001
From: Juan David Nicholls Cardona
Date: Sat, 26 Jun 2021 11:48:02 -0500
Subject: [PATCH 03/13] Update README.md
---
README.md | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/README.md b/README.md
index efdfa29..af197e8 100644
--- a/README.md
+++ b/README.md
@@ -485,6 +485,12 @@ Support this project with your organization. Your logo will show up here with a
I believe in Unicorns 🦄
Support [me](http://www.paypal.me/jdnichollsc/2), if you do too.
+Donate **Ethereum**, **ADA**, **BNB**, **SHIBA**, **USDT**, **DOGE**:
+
+![Wallet address](https://user-images.githubusercontent.com/2154886/123501719-84bf1900-d60c-11eb-882c-98a499cea323.png)
+
+Please let us know your contributions! 🙏
+
## Enterprise 💼
Available as part of the Tidelift Subscription.
From 979c502aa1ff0713f0aa1dfeb85a72ed7cc8c5e1 Mon Sep 17 00:00:00 2001
From: Juan David Nicholls Cardona
Date: Sat, 26 Jun 2021 12:18:10 -0500
Subject: [PATCH 04/13] Update README.md
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index af197e8..a5a9c86 100644
--- a/README.md
+++ b/README.md
@@ -489,6 +489,8 @@ Donate **Ethereum**, **ADA**, **BNB**, **SHIBA**, **USDT**, **DOGE**:
![Wallet address](https://user-images.githubusercontent.com/2154886/123501719-84bf1900-d60c-11eb-882c-98a499cea323.png)
+> Wallet address: 0x3F9fA8021B43ACe578C2352861Cf335449F33427
+
Please let us know your contributions! 🙏
## Enterprise 💼
From 708ba8478177f8a861f3595408acc9fecf3f80f8 Mon Sep 17 00:00:00 2001
From: Juan David Nicholls Cardona
Date: Sat, 26 Jun 2021 12:23:56 -0500
Subject: [PATCH 05/13] Update README
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index a5a9c86..f0ab254 100644
--- a/README.md
+++ b/README.md
@@ -273,8 +273,8 @@ export const getDeepLink = (path = "") => {
- App.js ([Using react-navigation with Deep Linking](https://reactnavigation.org/docs/en/deep-linking.html))
```javascript
import { Root } from 'native-base'
-import { getDeepLink } from './utilities'
import { createStackNavigator } from 'react-navigation'
+import { getDeepLink } from './utilities'
const Main = createStackNavigator(
{
From b3a9d7879fe692cdb8b8f247e9462080b0bdc9c1 Mon Sep 17 00:00:00 2001
From: Juan David Nicholls Cardona
Date: Sat, 26 Jun 2021 12:28:59 -0500
Subject: [PATCH 06/13] Update README
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index f0ab254..c935a43 100644
--- a/README.md
+++ b/README.md
@@ -70,7 +70,7 @@ Linking the package manually is not required anymore with [Autolinking](https://
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
- # Only using Android Support libraries
+ // Only using Android Support libraries
supportLibVersion = "28.0.0"
}
```
@@ -85,7 +85,7 @@ Linking the package manually is not required anymore with [Autolinking](https://
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
- # Remove 'supportLibVersion' property and put specific versions for AndroidX libraries
+ // Remove 'supportLibVersion' property and put specific versions for AndroidX libraries
androidXAnnotation = "1.1.0"
androidXBrowser = "1.0.0"
// Put here other AndroidX dependencies
From 397e4b71e945b586dc2c39da8f96e2e11bd320bb Mon Sep 17 00:00:00 2001
From: Juan David Nicholls Cardona
Date: Sat, 26 Jun 2021 17:15:59 -0500
Subject: [PATCH 07/13] Fix authentication flow Android config from README
---
README.md | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index c935a43..b3f7c5c 100644
--- a/README.md
+++ b/README.md
@@ -236,12 +236,16 @@ define your app scheme and replace `my-scheme` and `my-host` with your info.
- Enable deep linking (Android) - **[AndroidManifest.xml](https://github.com/proyecto26/react-native-inappbrowser/blob/master/example/android/app/src/main/AndroidManifest.xml#L23)**
```
-
-
-
-
-
-
+
+
+
+
+
+
+
+
```
- Enable deep linking (iOS) - **[Info.plist](https://github.com/proyecto26/react-native-inappbrowser/blob/master/example/ios/example/Info.plist#L23)**
From 48bc53c039ee9ed2e3d3c21ec693eb03cdecf3f6 Mon Sep 17 00:00:00 2001
From: Juan David Nicholls Cardona
Date: Sat, 26 Jun 2021 17:20:24 -0500
Subject: [PATCH 08/13] Replace master branch with main
---
.github/pull_request_template.md | 2 +-
README.md | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index ff3a543..ff6cb17 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -9,7 +9,7 @@ To help the rest of the community review your change, please follow the instruct
## PR Checklist
-- [ ] The PR title follows our guidelines: https://github.com/proyecto26/react-native-inappbrowser/blob/master/CONTRIBUTING.md#pull-request-process.
+- [ ] The PR title follows our guidelines: https://github.com/proyecto26/react-native-inappbrowser/blob/main/CONTRIBUTING.md#pull-request-process.
- [ ] There is an issue for the bug/feature this PR is for. To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it.
- [ ] All existing tests are passing
- [ ] Tests for the changes are included
diff --git a/README.md b/README.md
index b3f7c5c..438a8d7 100644
--- a/README.md
+++ b/README.md
@@ -234,7 +234,7 @@ import { InAppBrowser } from 'react-native-inappbrowser-reborn'
In order to redirect back to your application from a web browser, you must specify a unique URI to your app. To do this,
define your app scheme and replace `my-scheme` and `my-host` with your info.
-- Enable deep linking (Android) - **[AndroidManifest.xml](https://github.com/proyecto26/react-native-inappbrowser/blob/master/example/android/app/src/main/AndroidManifest.xml#L23)**
+- Enable deep linking (Android) - **[AndroidManifest.xml](https://github.com/proyecto26/react-native-inappbrowser/blob/main/example/android/app/src/main/AndroidManifest.xml#L23)**
```
```
-- Enable deep linking (iOS) - **[Info.plist](https://github.com/proyecto26/react-native-inappbrowser/blob/master/example/ios/example/Info.plist#L23)**
+- Enable deep linking (iOS) - **[Info.plist](https://github.com/proyecto26/react-native-inappbrowser/blob/main/example/ios/example/Info.plist#L23)**
```
CFBundleURLTypes
From 1211a64d6766737c4621c983ee698300b4450692 Mon Sep 17 00:00:00 2001
From: Juan David Nicholls Cardona
Date: Sun, 27 Jun 2021 00:35:06 -0500
Subject: [PATCH 09/13] fix(android): Validate url from Android platform
---
CHANGELOG.md | 7 +++-
.../ChromeTabsDismissedEvent.java | 4 ++-
.../ChromeTabsManagerActivity.java | 34 +++++++++++--------
.../inappbrowser/RNInAppBrowser.java | 10 ++++--
example/.gitignore | 2 ++
example/App.js | 2 +-
package.json | 2 +-
7 files changed, 40 insertions(+), 21 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 05aa8c5..4f96aec 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,10 @@ in case of vulnerabilities.
## [Unreleased]
+## [3.6.1] - 2021-06-27
+
+- Add try catch block to `CustomTabs` logic to validate the url.
+
## [3.6.0] - 2021-06-25
### Added
@@ -187,7 +191,8 @@ Missing tags for previous versions 🤷♂
- Fix `EventBusException` on **Android** by [@Almouro](https://github.com/Almouro) ([9cf4cbb](https://github.com/proyecto26/react-native-inappbrowser/commit/9cf4cbb58d55c8b534dabac6791e6a2a5428253f)).
-[Unreleased]: https://github.com/proyecto26/react-native-inappbrowser/compare/v3.6.0...HEAD
+[Unreleased]: https://github.com/proyecto26/react-native-inappbrowser/compare/v3.6.1...HEAD
+[3.6.1]: https://github.com/proyecto26/react-native-inappbrowser/compare/v3.6.0...v3.6.1
[3.6.0]: https://github.com/proyecto26/react-native-inappbrowser/compare/v3.5.1...v3.6.0
[3.5.1]: https://github.com/proyecto26/react-native-inappbrowser/compare/v3.5.0...v3.5.1
[3.5.0]: https://github.com/proyecto26/react-native-inappbrowser/compare/v3.4.0...v3.5.0
diff --git a/android/src/main/java/com/proyecto26/inappbrowser/ChromeTabsDismissedEvent.java b/android/src/main/java/com/proyecto26/inappbrowser/ChromeTabsDismissedEvent.java
index f4655f4..ed12d2d 100644
--- a/android/src/main/java/com/proyecto26/inappbrowser/ChromeTabsDismissedEvent.java
+++ b/android/src/main/java/com/proyecto26/inappbrowser/ChromeTabsDismissedEvent.java
@@ -3,9 +3,11 @@
public class ChromeTabsDismissedEvent {
public final String message;
public final String resultType;
+ public final Boolean isError;
- public ChromeTabsDismissedEvent(String message, String resultType) {
+ public ChromeTabsDismissedEvent(String message, String resultType, Boolean isError) {
this.message = message;
this.resultType = resultType;
+ this.isError = isError;
}
}
\ No newline at end of file
diff --git a/android/src/main/java/com/proyecto26/inappbrowser/ChromeTabsManagerActivity.java b/android/src/main/java/com/proyecto26/inappbrowser/ChromeTabsManagerActivity.java
index 02636cf..165388e 100644
--- a/android/src/main/java/com/proyecto26/inappbrowser/ChromeTabsManagerActivity.java
+++ b/android/src/main/java/com/proyecto26/inappbrowser/ChromeTabsManagerActivity.java
@@ -39,20 +39,26 @@ private static Intent createBaseIntent(Context context) {
@Override
protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
+ try {
+ super.onCreate(savedInstanceState);
- // This activity gets opened in 2 different ways. If the extra KEY_BROWSER_INTENT is present we
- // start that intent and if it is not it means this activity was started with FLAG_ACTIVITY_CLEAR_TOP
- // in order to close the intent that was started previously so we just close this.
- if (getIntent().hasExtra(KEY_BROWSER_INTENT)
- && (savedInstanceState == null || savedInstanceState.getString(BROWSER_RESULT_TYPE) == null)
- ) {
- Intent browserIntent = getIntent().getParcelableExtra(KEY_BROWSER_INTENT);
- browserIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
- startActivity(browserIntent);
- resultType = DEFAULT_RESULT_TYPE;
- } else {
+ // This activity gets opened in 2 different ways. If the extra KEY_BROWSER_INTENT is present we
+ // start that intent and if it is not it means this activity was started with FLAG_ACTIVITY_CLEAR_TOP
+ // in order to close the intent that was started previously so we just close this.
+ if (getIntent().hasExtra(KEY_BROWSER_INTENT)
+ && (savedInstanceState == null || savedInstanceState.getString(BROWSER_RESULT_TYPE) == null)
+ ) {
+ Intent browserIntent = getIntent().getParcelableExtra(KEY_BROWSER_INTENT);
+ browserIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+ startActivity(browserIntent);
+ resultType = DEFAULT_RESULT_TYPE;
+ } else {
+ finish();
+ }
+ } catch (Exception e) {
+ EventBus.getDefault().post(new ChromeTabsDismissedEvent("Unable to open url.", "cancel", true));
finish();
+ e.printStackTrace();
}
}
@@ -76,10 +82,10 @@ protected void onDestroy() {
if (resultType != null) {
switch (resultType) {
case "cancel":
- EventBus.getDefault().post(new ChromeTabsDismissedEvent("chrome tabs activity closed", resultType));
+ EventBus.getDefault().post(new ChromeTabsDismissedEvent("chrome tabs activity closed", resultType, false));
break;
default:
- EventBus.getDefault().post(new ChromeTabsDismissedEvent("chrome tabs activity destroyed", DEFAULT_RESULT_TYPE));
+ EventBus.getDefault().post(new ChromeTabsDismissedEvent("chrome tabs activity destroyed", DEFAULT_RESULT_TYPE, false));
break;
}
resultType = null;
diff --git a/android/src/main/java/com/proyecto26/inappbrowser/RNInAppBrowser.java b/android/src/main/java/com/proyecto26/inappbrowser/RNInAppBrowser.java
index 80bf255..3b64a1f 100644
--- a/android/src/main/java/com/proyecto26/inappbrowser/RNInAppBrowser.java
+++ b/android/src/main/java/com/proyecto26/inappbrowser/RNInAppBrowser.java
@@ -238,9 +238,13 @@ public void onEvent(ChromeTabsDismissedEvent event) {
throw new AssertionError();
}
- WritableMap result = Arguments.createMap();
- result.putString("type", event.resultType);
- mOpenBrowserPromise.resolve(result);
+ if (event.isError) {
+ mOpenBrowserPromise.reject(ERROR_CODE, event.message);
+ } else {
+ WritableMap result = Arguments.createMap();
+ result.putString("type", event.resultType);
+ mOpenBrowserPromise.resolve(result);
+ }
mOpenBrowserPromise = null;
}
diff --git a/example/.gitignore b/example/.gitignore
index ad572e6..7e134ea 100644
--- a/example/.gitignore
+++ b/example/.gitignore
@@ -57,3 +57,5 @@ buck-out/
# CocoaPods
/ios/Pods/
+
+yarn.lock
\ No newline at end of file
diff --git a/example/App.js b/example/App.js
index 4f496be..e7a091a 100644
--- a/example/App.js
+++ b/example/App.js
@@ -37,7 +37,7 @@ export default class App extends Component {
super(props);
this.state = {
- url: 'https://www.proyecto26.com',
+ url: 'https://reactnative.dev',
statusBarStyle: 'dark-content',
};
}
diff --git a/package.json b/package.json
index a8bb33b..fc6a3af 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "react-native-inappbrowser-reborn",
- "version": "3.6.0",
+ "version": "3.6.1",
"description": "InAppBrowser for React Native",
"main": "index.js",
"scripts": {
From d7a7edbd17b67a7f3076deaaa4debe4e8c6659d2 Mon Sep 17 00:00:00 2001
From: Juan David Nicholls Cardona
Date: Sun, 27 Jun 2021 00:57:15 -0500
Subject: [PATCH 10/13] Code review
---
example/App.js | 1 -
ios/RNInAppBrowser.m | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/example/App.js b/example/App.js
index e7a091a..a69b6ef 100644
--- a/example/App.js
+++ b/example/App.js
@@ -96,7 +96,6 @@ export default class App extends Component {
Linking.openURL(url);
}
} catch (error) {
- console.error(error);
Alert.alert(error.message);
} finally {
// Restore the previous StatusBar of the App
diff --git a/ios/RNInAppBrowser.m b/ios/RNInAppBrowser.m
index 7b73f43..7eb5157 100644
--- a/ios/RNInAppBrowser.m
+++ b/ios/RNInAppBrowser.m
@@ -165,7 +165,7 @@ + (BOOL)requiresMainQueueSetup
}
@catch (NSException *exception) {
reject(RNInAppBrowserErrorCode, @"Unable to open url.", nil);
- [self _close];
+ [self flowDidFinish];
NSLog(@"CRASH: %@", exception);
NSLog(@"Stack Trace: %@", [exception callStackSymbols]);
return;
From 42ec4abe2d47354e0e4b99090ee4f0268c4637fc Mon Sep 17 00:00:00 2001
From: Juan David Nicholls Cardona
Date: Sun, 27 Jun 2021 01:01:50 -0500
Subject: [PATCH 11/13] Fix CHANGELOG
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4f96aec..c079255 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -24,6 +24,7 @@ in case of vulnerabilities.
## [3.6.1] - 2021-06-27
+### Added
- Add try catch block to `CustomTabs` logic to validate the url.
## [3.6.0] - 2021-06-25
From 8eca85443bd6ce43dc73d916e537d18bb2ae29b6 Mon Sep 17 00:00:00 2001
From: Juan David Nicholls Cardona
Date: Sun, 27 Jun 2021 01:02:51 -0500
Subject: [PATCH 12/13] Update README
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 438a8d7..80ac578 100644
--- a/README.md
+++ b/README.md
@@ -40,7 +40,7 @@ Do you want to see this package in action? Check these awesome projects, yay!
- [OLIO](https://olioex.com) - Share more. Waste less.
- [Alpe Audio](https://www.alpeaudio.com) - Courses On The Go.
- [VibePay](https://vibepay.com) - A simple, smarter, better way to get paid.
-- [Opinio](https://opinio.media) - allows the population to be surveyed on social issues.
+- [Opinio](https://opinio.media) - Allows the population to be surveyed on social issues.
- [medpex: Online Apotheke](https://www.medpex.de) - Online pharmacy for medicines & cosmetics with over 5 million customers.
Share your awesome project [here](https://github.com/proyecto26/react-native-inappbrowser/issues/164)! ❤️
From b6a193b0eedc4d9a3919a5e44914502a253773dc Mon Sep 17 00:00:00 2001
From: Juan David Nicholls Cardona
Date: Sun, 27 Jun 2021 01:50:40 -0500
Subject: [PATCH 13/13] Code review
---
.../inappbrowser/ChromeTabsManagerActivity.java | 8 +++++---
.../java/com/proyecto26/inappbrowser/RNInAppBrowser.java | 5 +++--
example/App.js | 3 ++-
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/android/src/main/java/com/proyecto26/inappbrowser/ChromeTabsManagerActivity.java b/android/src/main/java/com/proyecto26/inappbrowser/ChromeTabsManagerActivity.java
index 165388e..78bb33a 100644
--- a/android/src/main/java/com/proyecto26/inappbrowser/ChromeTabsManagerActivity.java
+++ b/android/src/main/java/com/proyecto26/inappbrowser/ChromeTabsManagerActivity.java
@@ -20,6 +20,7 @@ public class ChromeTabsManagerActivity extends Activity {
private boolean mOpened = false;
private String resultType = null;
+ private boolean isError = false;
public static Intent createStartIntent(Context context, Intent authIntent) {
Intent intent = createBaseIntent(context);
@@ -56,7 +57,8 @@ protected void onCreate(Bundle savedInstanceState) {
finish();
}
} catch (Exception e) {
- EventBus.getDefault().post(new ChromeTabsDismissedEvent("Unable to open url.", "cancel", true));
+ isError = true;
+ EventBus.getDefault().post(new ChromeTabsDismissedEvent("Unable to open url.", resultType, isError));
finish();
e.printStackTrace();
}
@@ -82,10 +84,10 @@ protected void onDestroy() {
if (resultType != null) {
switch (resultType) {
case "cancel":
- EventBus.getDefault().post(new ChromeTabsDismissedEvent("chrome tabs activity closed", resultType, false));
+ EventBus.getDefault().post(new ChromeTabsDismissedEvent("chrome tabs activity closed", resultType, isError));
break;
default:
- EventBus.getDefault().post(new ChromeTabsDismissedEvent("chrome tabs activity destroyed", DEFAULT_RESULT_TYPE, false));
+ EventBus.getDefault().post(new ChromeTabsDismissedEvent("chrome tabs activity destroyed", DEFAULT_RESULT_TYPE, isError));
break;
}
resultType = null;
diff --git a/android/src/main/java/com/proyecto26/inappbrowser/RNInAppBrowser.java b/android/src/main/java/com/proyecto26/inappbrowser/RNInAppBrowser.java
index 3b64a1f..6798ed6 100644
--- a/android/src/main/java/com/proyecto26/inappbrowser/RNInAppBrowser.java
+++ b/android/src/main/java/com/proyecto26/inappbrowser/RNInAppBrowser.java
@@ -187,6 +187,8 @@ public void open(Context context, final ReadableMap options, final Promise promi
} catch (Exception e) {
e.printStackTrace();
}
+
+ registerEventBus();
intent.setData(Uri.parse(url));
if (options.hasKey(KEY_SHOW_PAGE_TITLE)) {
@@ -196,8 +198,6 @@ public void open(Context context, final ReadableMap options, final Promise promi
intent.putExtra(CustomTabsIntent.EXTRA_TITLE_VISIBILITY_STATE, CustomTabsIntent.NO_TITLE);
}
- registerEventBus();
-
currentActivity.startActivity(
ChromeTabsManagerActivity.createStartIntent(currentActivity, intent),
customTabsIntent.startAnimationBundle);
@@ -243,6 +243,7 @@ public void onEvent(ChromeTabsDismissedEvent event) {
} else {
WritableMap result = Arguments.createMap();
result.putString("type", event.resultType);
+ result.putString("message", event.message);
mOpenBrowserPromise.resolve(result);
}
mOpenBrowserPromise = null;
diff --git a/example/App.js b/example/App.js
index a69b6ef..36bdf84 100644
--- a/example/App.js
+++ b/example/App.js
@@ -96,7 +96,8 @@ export default class App extends Component {
Linking.openURL(url);
}
} catch (error) {
- Alert.alert(error.message);
+ console.error(error);
+ Alert.alert(error.message || error);
} finally {
// Restore the previous StatusBar of the App
StatusBar.setBarStyle(statusBarStyle);