cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmo...@apache.org
Subject [08/37] git commit: 1. Added amazon-fireos platform. 2. Change to use cordova-amazon-fireos as the platform if user agent contains 'cordova-amazon-fireos'
Date Mon, 05 May 2014 15:06:29 GMT
1. Added amazon-fireos platform.
2. Change to use cordova-amazon-fireos as the platform if user agent contains 'cordova-amazon-fireos'


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/commit/71c0a89e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/71c0a89e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/71c0a89e

Branch: refs/heads/cdvtest
Commit: 71c0a89e0606b4d3f37e8d83b0b4408d2e900f7e
Parents: c68d756
Author: Archana Naik <naika@lab126.com>
Authored: Fri Oct 18 11:08:46 2013 -0700
Committer: Archana Naik <naika@lab126.com>
Committed: Wed Oct 30 10:23:56 2013 -0700

----------------------------------------------------------------------
 plugin.xml           | 11 +++++++++++
 test/cordova-incl.js |  3 ++-
 2 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/71c0a89e/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index cd05083..e93b06c 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -40,6 +40,17 @@
         <source-file src="src/android/Device.java" target-dir="src/org/apache/cordova/device"
/>
     </platform>
 
+    <!-- amazon-fireos -->
+    <platform name="amazon-fireos">
+        <config-file target="res/xml/config.xml" parent="/*">
+            <feature name="Device" >
+                <param name="android-package" value="org.apache.cordova.device.Device"/>
+            </feature>
+        </config-file>
+
+        <source-file src="src/android/Device.java" target-dir="src/org/apache/cordova/device"
/>
+    </platform>
+    
     <!-- ios -->
     <platform name="ios">
         <config-file target="config.xml" parent="/*">

http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/71c0a89e/test/cordova-incl.js
----------------------------------------------------------------------
diff --git a/test/cordova-incl.js b/test/cordova-incl.js
index a82c590..df844b7 100644
--- a/test/cordova-incl.js
+++ b/test/cordova-incl.js
@@ -22,6 +22,7 @@
 var PLAT;
 (function getPlatform() {
     var platforms = {
+        amazon-fireos: /cordova-amazon-fireos/,
         android: /Android/,
         ios: /(iPad)|(iPhone)|(iPod)/,
         blackberry10: /(BB10)/,
@@ -76,7 +77,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 {


Mime
View raw message