diff --git a/res/raw/alarm.wav b/res/raw/alarm.wav new file mode 100644 index 0000000..0682cd3 Binary files /dev/null and b/res/raw/alarm.wav differ diff --git a/www/index.html b/www/index.html index 7fd4e6b..3697d71 100644 --- a/www/index.html +++ b/www/index.html @@ -383,7 +383,7 @@

- + diff --git a/www/js/main.js b/www/js/main.js index 7c500b6..7646dd7 100644 --- a/www/js/main.js +++ b/www/js/main.js @@ -868,39 +868,27 @@ function onDeviceReadyPush() { * gestisce la notifica ricevuta */ push.on('notification', function(data) { - // console.log(JSON.stringify(data)); + console.log(JSON.stringify(data)); // alert(JSON.stringify(data)); - /* - { - "title": "ciaooo", - "message": "ciaone", - "additionalData": { - "google.message_id": "0:1489146072171053%91acc10daee52ff4", - "coldstart": false, - "collapse_key": "ciaooo", - "foreground": true - } - } - */ $("body").pagecontainer("change", "#alert"); $("#alert-title").html(data.title); $("#alert-message").html(data.message); - /* - * suona l'allarme - */ - my_media = new Media("/android_asset/www/media/alarm.wav", - // success callback - function () { - console.log("play(): Success"); - }, - // error callback - function (err) { - console.log("play(): Error: " + JSON.stringify(err)); - } - ); - my_media.play(); + // /* + // * suona l'allarme + // */ + // my_media = new Media("/android_asset/www/media/alarm.wav", + // // success callback + // function () { + // console.log("play(): Success"); + // }, + // // error callback + // function (err) { + // console.log("play(): Error: " + JSON.stringify(err)); + // } + // ); + // my_media.play(); }); push.on('error', function(e) {