ios - Execute JavaScript when tapping on notification -
i'm using phonegap pushplugin cordova implement notifications on ios.
i managed far registering device , sending notifications successfully. when tap on notification, cannot execute piece of javascript open relevant page in application.
window.onnotificationapn = function(event) { if ( event.alert ) { navigator.notification.alert(event.alert); //call javascript here? } if ( event.sound ) { var snd = new media(event.sound); snd.play(); } if ( event.badge ) { pushnotification.setapplicationiconbadgenumber(successhandler, errorhandler, event.badge); } }
i tried adding javascript under if(event.alert) not executed. data javascript code should using sent part of notification payload. doing wrong?
Comments
Post a Comment