cordova-commits mailing list archives

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


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

Branch: refs/heads/master
Commit: 814881ac57dc8b31fffa60b34a9d2792e5e83ec3
Parents: 5784fda
Author: Archana Naik <naika@lab126.com>
Authored: Fri Oct 18 15:09:57 2013 -0700
Committer: Archana Naik <naika@lab126.com>
Committed: Wed Oct 30 13:53:15 2013 -0700

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


http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/814881ac/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 64aef0f..259e4bf 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -38,6 +38,26 @@ id="org.apache.cordova.media"
         <source-file src="src/android/FileHelper.java" target-dir="src/org/apache/cordova/media"
/>
      </platform>
      
+     <!-- amazon-fireos -->
+    <platform name="amazon-fireos">
+        <config-file target="res/xml/config.xml" parent="/*">
+            <feature name="Media" >
+                <param name="android-package" value="org.apache.cordova.media.AudioHandler"/>
+            </feature>
+        </config-file>
+        
+        <config-file target="AndroidManifest.xml" parent="/*">
+            <uses-permission android:name="android.permission.RECORD_AUDIO" />
+            <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
+            <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
/>
+        </config-file>
+        
+        <source-file src="src/android/AudioHandler.java" target-dir="src/org/apache/cordova/media"
/>
+        <source-file src="src/android/AudioPlayer.java" target-dir="src/org/apache/cordova/media"
/>
+        <source-file src="src/android/FileHelper.java" target-dir="src/org/apache/cordova/media"
/>
+     </platform>
+
+
      <!-- ios -->
      <platform name="ios">    
          <config-file target="config.xml" parent="/*">

http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/814881ac/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