Browse Source

Only add platform specific properties if required.

Sebastián Katzer 12 years ago
parent
commit
8e8546c07d
1 changed files with 11 additions and 2 deletions
  1. 11 2
      www/local-notification.js

+ 11 - 2
www/local-notification.js

@@ -25,12 +25,21 @@ LocalNotification.prototype = {
             title:      '',
             badge:      0,
             id:         0,
-            icon:       'icon', // nur Android
-            sound:      '', // nur iOS
             background: '',
             foreground: ''
         };
 
+        switch (device.platform) {
+            case 'Android':
+                defaults.icon = 'icon'; break;
+            case 'iOS':
+                defaults.sound = ''; break;
+            case 'WinCE': case 'Win32NT':
+                defaults.smallImage = null;
+                defaults.image = null;
+                defaults.wideImage = null;
+        };
+
         var callbackFn = function (cmd) {
             eval(cmd);
         };