incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject [4/14] android commit: added deleted tempfile setup
Date Thu, 12 Jul 2012 21:44:09 GMT
added deleted tempfile setup


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/3ea72e5d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/3ea72e5d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/3ea72e5d

Branch: refs/heads/master
Commit: 3ea72e5d212cf6911cd0465d65f1edab3617e650
Parents: 762854a
Author: Lorin Beer <lorin.beer@nitobi.com>
Authored: Thu Jun 28 16:17:00 2012 -0700
Committer: Lorin Beer <lorin.beer@nitobi.com>
Committed: Thu Jun 28 16:17:00 2012 -0700

----------------------------------------------------------------------
 framework/src/org/apache/cordova/AudioPlayer.java |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/3ea72e5d/framework/src/org/apache/cordova/AudioPlayer.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/AudioPlayer.java b/framework/src/org/apache/cordova/AudioPlayer.java
index 3d520a2..14645b2 100644
--- a/framework/src/org/apache/cordova/AudioPlayer.java
+++ b/framework/src/org/apache/cordova/AudioPlayer.java
@@ -96,6 +96,13 @@ public class AudioPlayer implements OnCompletionListener, OnPreparedListener,
On
         this.handler = handler;
         this.id = id;
         this.audioFile = file;	
+
+        if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
+            this.tempFile = Environment.getExternalStorageDirectory().getAbsolutePath() +
"/tmprecording.mp3";
+        } else {
+            this.tempFile = "/data/data/" + handler.ctx.getActivity().getPackageName() +
"/cache/tmprecording.mp3";
+        }
+
     }
 
     /**


Mime
View raw message