You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried the plugin and Android 5 it was working fine. But on Android 5.1.1 it is not working. I mean not detecting headset.
Below are the codes.
function plays() {
window.HeadsetDetection.detect(function(detected) {
alert('hi');
window.plugins.insomnia.keepAwake()
cordova.plugins.tonegenerator.play(250)
})
document.addEventListener('deviceready', function() {
window.HeadsetDetection.registerRemoteEvents(function(status) {
switch (status) {
case 'headsetAdded':
// alert('hi');
window.plugins.insomnia.keepAwake()
cordova.plugins.tonegenerator.play(250)
break;
case 'headsetRemoved':
alert('Please connect to Headset/Earpiece then play.');
break;
};
});
}, false);
Any advise what am i doing wrong?
}
The text was updated successfully, but these errors were encountered:
I tried the plugin and Android 5 it was working fine. But on Android 5.1.1 it is not working. I mean not detecting headset.
Below are the codes.
function plays() {
window.HeadsetDetection.detect(function(detected) {
alert('hi');
window.plugins.insomnia.keepAwake()
cordova.plugins.tonegenerator.play(250)
})
document.addEventListener('deviceready', function() {
window.HeadsetDetection.registerRemoteEvents(function(status) {
switch (status) {
case 'headsetAdded':
// alert('hi');
window.plugins.insomnia.keepAwake()
cordova.plugins.tonegenerator.play(250)
break;
case 'headsetRemoved':
alert('Please connect to Headset/Earpiece then play.');
break;
};
});
}, false);
Any advise what am i doing wrong?
}
The text was updated successfully, but these errors were encountered: