File tree 1 file changed +3
-0
lines changed
1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 66
66
function onNotificationAPN ( e ) {
67
67
if ( e . alert ) {
68
68
$ ( "#app-status-ul" ) . append ( '<li>push-notification: ' + e . alert + '</li>' ) ;
69
+ // showing an alert also requires the org.apache.cordova.dialogs plugin
69
70
navigator . notification . alert ( e . alert ) ;
70
71
}
71
72
72
73
if ( e . sound ) {
74
+ // playing a sound also requires the org.apache.cordova.media plugin
73
75
var snd = new Media ( e . sound ) ;
74
76
snd . play ( ) ;
75
77
}
106
108
// On Amazon FireOS all custom attributes are contained within payload
107
109
var soundfile = e . soundname || e . payload . sound ;
108
110
// if the notification contains a soundname, play it.
111
+ // playing a sound also requires the org.apache.cordova.media plugin
109
112
var my_media = new Media ( "/android_asset/www/" + soundfile ) ;
110
113
111
114
my_media . play ( ) ;
You can’t perform that action at this time.
0 commit comments