-1

I coded an application with phonegap, I used the plugin cordova-media-capture and when using the apk, the use of the microphone returns me the error code 3.

I would like to know how to solve this problem.

shilovk
  • 11,718
  • 17
  • 75
  • 74

1 Answers1

0

Here is my html code for more details:

   <div class="row">
     <div class="col-5"></div>
     <div class="col-90">
    <a href="" class="button button-big button-fill" id="MicrophoneBtnTakeId"><i class="f7-icons">mic</i></a>
    </div>
    <div class="col-5"></div>
</div>

then also my js code:

    $$('#MicrophoneBtnTakeId').on('click', function() {

        // capture error callback
        var captureError = function(error) {
            navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
            $$('#TxtMicrophoneErrorAppClickId').show();
            $$('#SoundRecorderBtnAppId').show();
        };

        // start audio capture
        navigator.device.capture.captureAudio(captureSuccess, captureError);

        var captureSuccess = function(mediaFiles) {
            var i, path, len;
            for (i = 0, len = mediaFiles.length; i < len; i += 1) {
                path = mediaFiles[i].fullPath;
            }
        }
       });

Hopefully this will help those who want to help me solve this problem.

Thank you