cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [2/8] git commit: Added amazon-fireos platform. Change to use amazon-fireos as a platform if user agent string contains 'cordova-amazon-fireos'
Date Thu, 05 Dec 2013 00:59:47 GMT
Added amazon-fireos platform.
Change to use amazon-fireos as a platform if user agent string contains 'cordova-amazon-fireos'


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/0b37dac4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/0b37dac4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/0b37dac4

Branch: refs/heads/master
Commit: 0b37dac4e54dfd6057cbabf681fe4b0ce247c536
Parents: 6b1a781
Author: Archana Naik <naika@lab126.com>
Authored: Fri Oct 18 15:15:24 2013 -0700
Committer: Archana Naik <naika@lab126.com>
Committed: Wed Oct 30 14:42:37 2013 -0700

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


http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/0b37dac4/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index ad8290e..a2ea8bd 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -60,6 +60,24 @@ xmlns:android="http://schemas.android.com/apk/res/android"
         <source-file src="src/android/FileHelper.java" target-dir="src/org/apache/cordova/mediacapture"
/>
     </platform>
     
+    <!-- amazon-fireos -->
+    <platform name="amazon-fireos">
+        <config-file target="res/xml/config.xml" parent="/*">
+            <feature name="Capture" >
+                <param name="android-package" value="org.apache.cordova.mediacapture.Capture"/>
+            </feature>
+        </config-file>
+        
+        <config-file target="AndroidManifest.xml" parent="/*">
+            <uses-permission android:name="android.permission.RECORD_AUDIO" />
+            <uses-permission android:name="android.permission.RECORD_VIDEO"/>
+            <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
/>
+        </config-file>
+
+        <source-file src="src/android/Capture.java" target-dir="src/org/apache/cordova/mediacapture"
/>
+        <source-file src="src/android/FileHelper.java" target-dir="src/org/apache/cordova/mediacapture"
/>
+    </platform>
+    
     <!-- ios -->
     <platform name="ios">    
         <config-file target="config.xml" parent="/*">

http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/0b37dac4/test/cordova-incl.js
----------------------------------------------------------------------
diff --git a/test/cordova-incl.js b/test/cordova-incl.js
index a82c590..bd612be 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