Loading Example/www/index.html +3 −0 Changes for Example/www/index.html: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -66,10 +66,12 @@ NOTE: function onNotificationAPN(e) { if (e.alert) { $("#app-status-ul").append('<li>push-notification: ' + e.alert + '</li>'); // showing an alert also requires the org.apache.cordova.dialogs plugin navigator.notification.alert(e.alert); } if (e.sound) { // playing a sound also requires the org.apache.cordova.media plugin var snd = new Media(e.sound); snd.play(); } Loading Loading @@ -106,6 +108,7 @@ NOTE: // On Amazon FireOS all custom attributes are contained within payload var soundfile = e.soundname || e.payload.sound; // if the notification contains a soundname, play it. // playing a sound also requires the org.apache.cordova.media plugin var my_media = new Media("/android_asset/www/"+ soundfile); my_media.play(); Loading Loading
Example/www/index.html +3 −0 Changes for Example/www/index.html: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -66,10 +66,12 @@ NOTE: function onNotificationAPN(e) { if (e.alert) { $("#app-status-ul").append('<li>push-notification: ' + e.alert + '</li>'); // showing an alert also requires the org.apache.cordova.dialogs plugin navigator.notification.alert(e.alert); } if (e.sound) { // playing a sound also requires the org.apache.cordova.media plugin var snd = new Media(e.sound); snd.play(); } Loading Loading @@ -106,6 +108,7 @@ NOTE: // On Amazon FireOS all custom attributes are contained within payload var soundfile = e.soundname || e.payload.sound; // if the notification contains a soundname, play it. // playing a sound also requires the org.apache.cordova.media plugin var my_media = new Media("/android_asset/www/"+ soundfile); my_media.play(); Loading