From 75f78b90320dcad05e9e827f042728f0d4e38091 Mon Sep 17 00:00:00 2001 From: Archana Naik Date: Fri, 18 Oct 2013 15:29:57 -0700 Subject: [PATCH] Added amazon-fireos platform. Change to use amazon-fireos as a platform if the user agent string contains 'cordova-amazon-fireos' --- plugin.xml | 11 +++++++++++ test/cordova-incl.js | 6 ++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/plugin.xml b/plugin.xml index 0629f79..8450c17 100644 --- a/plugin.xml +++ b/plugin.xml @@ -26,6 +26,17 @@ + + + + + + + + + + + diff --git a/test/cordova-incl.js b/test/cordova-incl.js index dbcd1a6..d5c90fb 100644 --- a/test/cordova-incl.js +++ b/test/cordova-incl.js @@ -20,7 +20,9 @@ */ var PLAT; -if (/Android/.exec(navigator.userAgent)) { +if (/cordova-amazon-fireos/.exec(navigator.userAgent)) { + PLAT = 'amazon-fireos'; +} else if (/Android/.exec(navigator.userAgent)) { PLAT = 'android'; } else if (/(iPad)|(iPhone)|(iPod)/.exec(navigator.userAgent)) { PLAT = 'ios'; @@ -61,7 +63,7 @@ if (!window._doNotWriteCordovaScript) { } function backHome() { - if (window.device && device.platform && device.platform.toLowerCase() == 'android') { + if (window.device && device.platform && (device.platform.toLowerCase() == 'android' || device.platform.toLowerCase() == 'amazon-fireos')) { navigator.app.backHistory(); } else {