Skip to content

Commit

Permalink
Reference dependencies in example
Browse files Browse the repository at this point in the history
  • Loading branch information
BBosman committed Jun 16, 2014
1 parent 54e59bc commit e0ec384
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Example/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,12 @@
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();
}
Expand Down Expand Up @@ -106,6 +108,7 @@
// 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();
Expand Down

0 comments on commit e0ec384

Please sign in to comment.