Estou usando o plugin para notificações. Fiz a instalação: cordova plugin add cordova-plugin-dialogs Inserir o código no meu .js:
$("#callbarcode").click(function(){
console.log("OK " + navigator.notification);
navigator.notification.confirm(
'You are the winner!', // message
onConfirm, // callback to invoke with index of button pressed
'Game Over', // title
['Restart','Exit'] // buttonLabels
);
});
function onConfirm() {
alert('You selected button ' + buttonIndex);
}
Mas quando executo o click do botão exibe o seguinte: Unable to get property 'confirm' of undefined or null reference
Alguem sabe o que pode está acontecendo?