i added alert before switch on it give alert
but when i added alert after switchOn( ) it does not work
if ( on==='true') {
alert(before);//this works
window.plugins.flashlight.switchOn();
alert(after);//it does not give allert
}
how can i handle error?