summaryrefslogtreecommitdiff
path: root/www/js/EventServer.js
diff options
context:
space:
mode:
authorpliablepixels <pliablepixels@gmail.com>2016-02-01 15:49:30 -0500
committerpliablepixels <pliablepixels@gmail.com>2016-02-01 15:49:30 -0500
commit1643d47c2a4e946012455f5702b92e8402bb46a2 (patch)
tree5d5af99bc42b9f05fe0fb4c948214d24287e5a17 /www/js/EventServer.js
parent6f70a38294bd6a5ca24fad669d6280b4bce7b952 (diff)
#135 - initial code towards allowing system sound - not working yet
Former-commit-id: 939d7ac5decaf5761b079b65bfdc9f8a5bebf164
Diffstat (limited to 'www/js/EventServer.js')
-rw-r--r--www/js/EventServer.js38
1 files changed, 31 insertions, 7 deletions
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
+ }
+ }
+
+ );
+ }
}