I am using Visual studio tools for Apache Cordova to develop Android app. I started new project and added speech recognition plugin using GIT url.
https://github.com/macdonst/SpeechRecognitionPlugin
It installed successfully and project build is also successful. When I run application, In below code, It shows one alert before Speech recognition plugin initialization and never reaches second alert after that in below code.
function onDeviceReady() {
// Handle the Cordova pause and resume events
alert('test');
recognition = new SpeechRecognition();
alert('test 2');
recognition.onresult = function (event) {
if (event.results.length > 0) {
alert(event.results[0][0].transcript);
q.value = event.results[0][0].transcript;
//q.form.submit();
}
}
alert('test 2');
document.addEventListener( 'pause', onPause.bind( this ), false );
document.addEventListener( 'resume', onResume.bind( this ), false );
// TODO: Cordova has been loaded. Perform any initialization that requires Cordova here.
var element = document.getElementById("deviceready");
element.innerHTML = 'Device Ready';
element.className += ' ready';
};
please help, am i missing something here while adding plug-in?