summaryrefslogtreecommitdiff
path: root/StoneIsland/plugins/cordova-plugin-customurlscheme/www/android
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-11-30 23:07:12 -0500
committerJules Laplace <jules@okfoc.us>2015-11-30 23:07:12 -0500
commitef14c875d7056f90be606ebf1f389c112b947f81 (patch)
tree0a0fa9f13f32c5fc2b5afdfaaea48c6aa3bd35f4 /StoneIsland/plugins/cordova-plugin-customurlscheme/www/android
parent0381ab43b7e110a5c3950ca9f8bbe4007963c907 (diff)
canadian country code
Diffstat (limited to 'StoneIsland/plugins/cordova-plugin-customurlscheme/www/android')
-rw-r--r--StoneIsland/plugins/cordova-plugin-customurlscheme/www/android/LaunchMyApp.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/StoneIsland/plugins/cordova-plugin-customurlscheme/www/android/LaunchMyApp.js b/StoneIsland/plugins/cordova-plugin-customurlscheme/www/android/LaunchMyApp.js
new file mode 100644
index 00000000..19dbdc0b
--- /dev/null
+++ b/StoneIsland/plugins/cordova-plugin-customurlscheme/www/android/LaunchMyApp.js
@@ -0,0 +1,24 @@
+(function () {
+ "use strict";
+
+ var remainingAttempts = 10;
+
+ function waitForAndCallHandlerFunction(url) {
+ if (typeof window.handleOpenURL == "function") {
+ window.handleOpenURL(url);
+ } else if (remainingAttempts-- > 0) {
+ setTimeout(function(){waitForAndCallHandlerFunction(url)}, 500);
+ }
+ }
+
+ function triggerOpenURL() {
+ cordova.exec(
+ waitForAndCallHandlerFunction,
+ null,
+ "LaunchMyApp",
+ "checkIntent",
+ []);
+ }
+
+ document.addEventListener("deviceready", triggerOpenURL, false);
+}());