Software Archive
Read-only legacy content
17061 Discussions

Audio capture with Cordova Capture Plugin fails

Tom_R_3
Beginner
515 Views

Hi,

I'm trying to get to work the audio capture app as described in http://qnimate.com/record-microphone-audio-using-intel-xdk/ with Intel XDK 1816. When I debug the app on my iPhone 4 I get the following console logs:

deviceready has not fired after 5 seconds. cordova.js:1143
Channel not fired: onCordovaReady cordova.js:1136
Channel not fired: IntelXDKPreview cordova.js:1136
Channel not fired: onCordovaInfoReady cordova.js:1136

When navigator.device.capture.captureAudio(captureSuccess, captureError, {limit: 1, duration: 10}); is called, navigator.device is undefined leading to an error.

Do you have any suggestions how to solve this?

0 Kudos
2 Replies
PaulF_IntelCorp
Employee
515 Views

The call is failing because the Cordova deviceready event has not happened. Something is wrong with the underlying Cordova initialization (what those error messages mean). Try using this sample app (you can find it on the samples and demos page in the XDK): https://github.com/gomobile/sample-media-recording

0 Kudos
Tom_R_3
Beginner
515 Views

Thanks for the feedback. I've come around to using the phonegap Audio-App from the "HTML5+Cordova" section of sample codes. This one worked fine (compared to the other sample app "Media Recording", which has problems with iPhone / Safari). 

0 Kudos
Reply