{"action":"opened","issue":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/802","repository_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push","labels_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/802/labels{/name}","comments_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/802/comments","events_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/802/events","html_url":"https://github.com/phonegap/phonegap-plugin-push/issues/802","id":147962747,"number":802,"title":"Init doesn't fire with PhoneGap Build","user":{"login":"stileinverso","id":6285444,"avatar_url":"https://avatars.githubusercontent.com/u/6285444?v=3","gravatar_id":"","url":"https://api.github.com/users/stileinverso","html_url":"https://github.com/stileinverso","followers_url":"https://api.github.com/users/stileinverso/followers","following_url":"https://api.github.com/users/stileinverso/following{/other_user}","gists_url":"https://api.github.com/users/stileinverso/gists{/gist_id}","starred_url":"https://api.github.com/users/stileinverso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stileinverso/subscriptions","organizations_url":"https://api.github.com/users/stileinverso/orgs","repos_url":"https://api.github.com/users/stileinverso/repos","events_url":"https://api.github.com/users/stileinverso/events{/privacy}","received_events_url":"https://api.github.com/users/stileinverso/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-13T06:46:24Z","updated_at":"2016-04-13T06:46:24Z","closed_at":null,"body":"Hi, guys!\r\nI'm trying to use **phonegap-plugin-push** inside my PG project for testing on my **Android** device.\r\nI'm using **PhoneGap Build** (https://build.phonegap.com).\r\nI spent a lot of time to configure it properly but... \r\n### My problem:\r\n**PushNotification.init** doesn't fire on my device.\r\n### Here the steps I do:\r\n\r\n1. create a zip file for my project\r\n2. upload on PhoneGap Build (https://build.phonegap.com)\r\n3. download .apk on my PC\r\n4. transfer it via bluetooth on my device\r\n5. install\r\n6. run\r\n\r\nWhen the app starts the alert \"device ready...\" appears (see the code) but no other alert message appears.\r\nIf I remove \"var push = ....... });\" I can see \"next step...\" alert.\r\n\r\n### Where I'm doing wrong?\r\n\r\n**Project structure**\r\n\r\n    [ .cordova ] // empty folder\r\n    [ hooks ] // empty folder\r\n    [ platforms ] // empty folder\r\n    [ plugins ] // empty folder\r\n    [ www ]\r\n        [ css ]\r\n        [ fonts ]\r\n        [ img ]\r\n        [ js ]\r\n            index.js\r\n        [ spec ]\r\n        icon.png\r\n        index.html\r\n        spec.html\r\n    config.xml\r\n\r\n**index.js**\r\n\r\n    document.addEventListener('deviceready', onDeviceReady, false);\r\n    \r\n    function onDeviceReady() {\r\n    \r\n        alert('device ready...');\r\n    \r\n        var push = PushNotification.init({\r\n            \"android\": { \"senderID\": \"***************\" }, // <- here I've inserted my Project ID\r\n            \"ios\": { \"alert\": \"true\", \"badge\": \"true\", \"sound\": \"true\" },\r\n            \"windows\": {}\r\n        });\r\n    \r\n        alert('next step...');\r\n    \r\n        push.on('registration', function(data) {\r\n            alert('registration...');\r\n            alert(data.registrationId);\r\n            $('#gcm_id').html(data.registrationId);\r\n        });\r\n    \r\n        push.on('notification', function(data) {\r\n            alert('notification...');\r\n            alert(data.title + \" Message: \" + data.message);\r\n        });\r\n    \r\n        push.on('error', function(e) {\r\n            alert('error!');\r\n            console.log(e.message);\r\n        });\r\n    }\r\n\r\n**config.xml**\r\n\r\n    ...\r\n    <gap:plugin name=\"com.phonegap.plugins.pushplugin\"/>\r\n    ...\r\n\r\n\r\n\r\n\r\n"}}