From 1643d47c2a4e946012455f5702b92e8402bb46a2 Mon Sep 17 00:00:00 2001 From: pliablepixels Date: Mon, 1 Feb 2016 15:49:30 -0500 Subject: #135 - initial code towards allowing system sound - not working yet Former-commit-id: 939d7ac5decaf5761b079b65bfdc9f8a5bebf164 --- www/js/EventServer.js | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) (limited to 'www/js/EventServer.js') diff --git a/www/js/EventServer.js b/www/js/EventServer.js index 352ff327..1e847508 100644 --- a/www/js/EventServer.js +++ b/www/js/EventServer.js @@ -379,16 +379,40 @@ angular.module('zmApp.controllers') } else { mediasrc = "/android_asset/www/sounds/blop.mp3"; - push = PushNotification.init( + var android_media_file = "blop"; + var ld = ZMDataModel.getLogin(); + + + if (!ld.defaultPushSound) + { + ZMDataModel.zmLog ("Using blop push sound"); + push = PushNotification.init( - { - "android": { - "senderID": zm.gcmSenderId, - "icon": "ic_stat_notification" + { + "android": { + "senderID": zm.gcmSenderId, + "icon": "ic_stat_notification", + //"sound": android_media_file + } } - } - ); + ); + } + else + { + ZMDataModel.zmLog ("Using default push sound"); + push = PushNotification.init( + + { + "android": { + "senderID": zm.gcmSenderId, + "icon": "ic_stat_notification", + "sound": android_media_file + } + } + + ); + } } -- cgit v1.2.3