diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 4aac3e48..a25a88c0 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -13,6 +13,7 @@
+
diff --git a/assets/gap.js b/assets/gap.js
index b15b0923..c7390440 100644
--- a/assets/gap.js
+++ b/assets/gap.js
@@ -307,6 +307,7 @@ var Device = {
window.DroidGap.httpGet(url, file);
}
},
+
storage: {
result: "",
testSDCard: function(){
@@ -330,6 +331,30 @@ var Device = {
return Device.storage.result;
}
}
+
+
+ audio: {
+ startRecording: function(file) {
+ window.DroidGap.startRecordingAudio(file);
+ },
+ stopRecording: function() {
+ window.DroidGap.stopRecordingAudio();
+ },
+ startPlaying: function(file) {
+ window.DroidGap.startPlayingAudio(file);
+ },
+ stopPlaying: function() {
+ window.DroidGap.stopPlayingAudio();
+ },
+ getCurrentPosition: function() {
+ return window.DroidGap.getCurrentPositionAudio();
+ },
+ getDuration: function(file) {
+ return window.DroidGap.getDurationAudio(file);
+ }
+ }
+
+
}
function gotLocation(lat, lon) {
diff --git a/assets/index.html b/assets/index.html
index a5ff8e48..e74ab1c8 100644
--- a/assets/index.html
+++ b/assets/index.html
@@ -105,9 +105,10 @@ function onReceiveSms(number, message)
http = function(func)
{
if (func == 'get') {
- Device.http.get($('httpGetUrl').value, $('httpGetFile').value)
+ Device.http.get($('httpGetUrl').value, $('httpGetFile').value);
}
}
+
fileManagement = function(x){
if (x == 'testSDCard'){
$('file_status').value = Device.storage.testSDCard();
@@ -125,6 +126,31 @@ fileManagement = function(x){
$('file_status').value = Device.storage.delDir($('deldir').value);
}
}
+=======
+
+audio = function(func)
+{
+ if (func == 'startPlaying') {
+ Device.audio.startPlaying($('audioFile').value);
+ } else
+ if (func == 'stopPlaying') {
+ Device.audio.stopPlaying();
+ } else
+ if (func == 'startRecording') {
+ Device.audio.startRecording($('audioFile').value);
+ } else
+ if (func == 'stopRecording') {
+ Device.audio.stopRecording();
+ } else
+ if (func == 'getCurrentPosition') {
+ $('posdur').value = Device.audio.getCurrentPosition();
+ } else
+ if (func == 'getDuration') {
+ $('posdur').value = Device.audio.getDuration($('audioFile').value);
+ }
+}
+
+
addLoadEvent(initGap);
@@ -146,6 +172,7 @@ addLoadEvent(initGap);
Vibration
Play Sound
Photo...
+ Audio...
Notification...
HTTP...
External Storage
@@ -333,4 +360,39 @@ addLoadEvent(initGap);
+
+
Audio
+
+
+
+
+
+
+
+