Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ In order to use the `close` event on Android it is recommended to have a short d
* `close` -> `success` (Boolean), `url` (String)
* `load` -> `success` (Boolean), `url` (String) - iOS only
* `redirect` -> `url` (String) - iOS only
* `error` -> `message` (String) - Android only

### `AuthenticationSession` (iOS only)

Expand Down
2 changes: 1 addition & 1 deletion android/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 2.3.0
version: 2.3.1
apiversion: 4
architectures: arm64-v8a armeabi-v7a x86 x86_64
description: titanium-web-dialog
Expand Down
9 changes: 8 additions & 1 deletion android/src/ti/webdialog/TitaniumWebDialogModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,14 @@ private void openCustomTab(Context context, List<String> customTabBrowsers, Krol
tabIntent.intent.setPackage(s);
}

tabIntent.launchUrl(context, Uri.parse(url));
try {
tabIntent.launchUrl(context, Uri.parse(url));
} catch (Exception e) {
KrollDict event = new KrollDict();
event.put("message", e.getLocalizedMessage());

fireEvent("error", event);
}
}

private Bitmap getIcon(String path)
Expand Down