Browse Source

@inizializzazione push plugin

halphass 7 years ago
parent
commit
fa341173e9
1 changed files with 6 additions and 13 deletions
  1. 6 13
      www/js/main.js

+ 6 - 13
www/js/main.js

@@ -849,27 +849,20 @@ function onDeviceReadyPush() {
         // console.log(JSON.stringify(registration));
         var url = "https://xm.bus.pm/api/d/c?device=" + registration.registrationId;
         $.get(url, function( data ) {
-            // alert(data);
-            // console.log(data);
-            // console.log(data);
-            // console.log(data);
-            // console.log(data);
+            console.log(JSON.stringify(data));
+            console.log(JSON.stringify(data));
             // $(".hiddendiv").append('<li>REQ A2A: '+ data +'</li>');
         });
     });
 
     push.on('notification', function(data) {
-        // alert(data.message);
-        // data.message,
-        // data.title,
-        // data.count,
-        // data.sound,
-        // data.image,
-        // data.additionalData
+        console.log(JSON.stringify(data));
+        console.log(JSON.stringify(data));
     });
 
     push.on('error', function(e) {
-        // e.message
+        console.log(JSON.stringify(e));
+        console.log(JSON.stringify(e));
     });
 };