It seems that the issue is being caused as there is no app on the device to handle the intent, which does seem odd. Anyhow, I've moved over to using the Media plugin for audio capture and have now ran into another issue! I'm getting FOUR callbacks to the media success function; an in turn four more for each NEW media I create (so 4 then 8 then 12 then 16 etc). Media plugin version is 0.2.16. Phonegap version is 3.6.3-0.22.6. Here is an example of the code I am using:
var thismedia = null;
var audiorecording = false;
var audioplaying = false;
function onDeviceReady()
{
recordaudiostart();
}
function mediasuccess()
{
alert("Got media success callback");
audiorecording = false;
}
function mediafailure(error)
{
thismedia.release();
audiorecording = false;
alert("Got media failure callback");
}
//Media.MEDIA_NONE = 0;
//Media.MEDIA_STARTING = 1;
//Media.MEDIA_RUNNING = 2;
//Media.MEDIA_PAUSED = 3;
//Media.MEDIA_STOPPED = 4;
//Media.MEDIA_MSG = ["None", "Starting", "Running", "Paused", "Stopped"];
function audiostatus(status)
{
try
{
switch(status)
{
case 1:
alert("Audio starting");
break;
case 4:
alert("Audio Stopped");
break;
}
}
catch(error)
{
alert("Error : "+error.message );
}
}
function recordaudiostart()
{
try
{
if(!audiorecording)
{
if(thismedia!==null)
{
thismedia.release();
}
var src = "myrecording.wav";
thismedia = new Media(src, mediasuccess, mediafailure, audiostatus);
thismedia.startRecord();
audiorecording = true;
}
else
{
alert("Already recording!");
}
}
catch(error)
{
alert("error "+error.message);
}
}
function recordaudiostop()
{
try
{
if(audiorecording)
{
alert("Stopping recording");
thismedia.stopRecord();
}
else
{
alert("Not recording anything");
}
}
catch(error)
{
alert("error "+error.message);
}
}
Any help with this would be greatly appreciated.