Quantcast
Viewing all articles
Browse latest Browse all 8068

Notification Sound in push Notification

I want to alert sound when notification is received by receiver. Below is my code and sound is not playing when is send notification through cloud

var data={

title: 'Example',

alert: 'Sample alert',

icon: 'KS_nav_views.png',

badge: 3,

sound: 'tune1',

vibrate: true,

custom_field: { score: 51, headlines: "And now for something completely different..." } } function sendTestNotification () {

Cloud.PushNotifications.notifyTokens({
    to_tokens: myPushDeviceToken,
    channel: 'friend_request',
    payload: data
}, function (e) {
    if (e.success) {
        alert('Push notification sent');
    } else {
        alert('Error:\n' + ((e.error && e.message) || JSON.stringify(e)));
    }
});

}


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>