{"action":"created","issue":{"url":"https://api.github.com/repos/Telerik-Verified-Plugins/PushNotification/issues/54","labels_url":"https://api.github.com/repos/Telerik-Verified-Plugins/PushNotification/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/Telerik-Verified-Plugins/PushNotification/issues/54/comments","events_url":"https://api.github.com/repos/Telerik-Verified-Plugins/PushNotification/issues/54/events","html_url":"https://github.com/Telerik-Verified-Plugins/PushNotification/issues/54","id":99148172,"number":54,"title":"No notifications in android when the app is closed","user":{"login":"aorylamballe","id":8555557,"avatar_url":"https://avatars.githubusercontent.com/u/8555557?v=3","gravatar_id":"","url":"https://api.github.com/users/aorylamballe","html_url":"https://github.com/aorylamballe","followers_url":"https://api.github.com/users/aorylamballe/followers","following_url":"https://api.github.com/users/aorylamballe/following{/other_user}","gists_url":"https://api.github.com/users/aorylamballe/gists{/gist_id}","starred_url":"https://api.github.com/users/aorylamballe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aorylamballe/subscriptions","organizations_url":"https://api.github.com/users/aorylamballe/orgs","repos_url":"https://api.github.com/users/aorylamballe/repos","events_url":"https://api.github.com/users/aorylamballe/events{/privacy}","received_events_url":"https://api.github.com/users/aorylamballe/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-05T08:11:06Z","updated_at":"2016-01-05T16:22:12Z","closed_at":"2015-08-14T06:14:39Z","body":"Hi,\r\n\r\nThis issue has been opened on the phonegap-build PushPlugin project (https://github.com/phonegap-build/PushPlugin/issues/85), but it does not seem maintained nor issues are addressed.\r\n\r\nI tried with this fork, and got the same issue, so I post it here.\r\n\r\n\r\nThe issue is that I don't receive any more notification once the application is closed (or sleeping, I'm not sure of the vocabulary): when I slide up the app in the list of opened apps (long press home button).\r\n\r\nI receive the notifications when:\r\n\r\n- The app is in foregroud (calling callback function)\r\n- The app is in background (in status bar, but no call to the callback function, even after the app is open)\r\n- With phone open and sleeping/locked\r\n\r\nBut the notifications are never received if the application is completely closed (slide up the app in the list of opened apps, or restart phone).\r\n\r\nI tried to always display notifications/call callback function in the root of ```CordovaGCMBroadcastReceiver.onReceive``` to check whether the problem is in this function. But ```onReceive``` is never called when the application is completely closed. It seems to be the cause, since it contains the code to trigger the notification.\r\n\r\nSimilarly, GCMIntentService.onMessage was never called in the original project.\r\n\r\nSuggestions from phonegap-build/PushPlugin issue does not seem to apply or help:\r\n\r\n- **delay_while_idle** is for the case when we don't receive the notification with locked screen (but I receive it, as long as the app is opened, background or foreground)\r\n- The **message** and **title** keys are present in the notification. Below is the content of the event object received in the callback function (which reflects the content of the notification received):\r\n\r\n``` javascript\r\n{\r\n    collapse_key : \"do_not_collapse\",\r\n    event : \"message\",\r\n    foreground : true,\r\n    from : \"123456789012\",\r\n    message : \"Some notification text\",\r\n    msgcnt : \"8\",\r\n    payload : {\r\n        message : \"Some notification text\",\r\n        msgcnt : \"8\",\r\n        title : \"My notification\"\r\n    }\r\n}\r\n```\r\n\r\nAny idea about how to fix it?\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/Telerik-Verified-Plugins/PushNotification/issues/comments/169049443","html_url":"https://github.com/Telerik-Verified-Plugins/PushNotification/issues/54#issuecomment-169049443","issue_url":"https://api.github.com/repos/Telerik-Verified-Plugins/PushNotification/issues/54","id":169049443,"user":{"login":"YaroslavG","id":5793103,"avatar_url":"https://avatars.githubusercontent.com/u/5793103?v=3","gravatar_id":"","url":"https://api.github.com/users/YaroslavG","html_url":"https://github.com/YaroslavG","followers_url":"https://api.github.com/users/YaroslavG/followers","following_url":"https://api.github.com/users/YaroslavG/following{/other_user}","gists_url":"https://api.github.com/users/YaroslavG/gists{/gist_id}","starred_url":"https://api.github.com/users/YaroslavG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YaroslavG/subscriptions","organizations_url":"https://api.github.com/users/YaroslavG/orgs","repos_url":"https://api.github.com/users/YaroslavG/repos","events_url":"https://api.github.com/users/YaroslavG/events{/privacy}","received_events_url":"https://api.github.com/users/YaroslavG/received_events","type":"User","site_admin":false},"created_at":"2016-01-05T16:22:12Z","updated_at":"2016-01-05T16:22:12Z","body":"aorylamballe,\r\nquestion: there may be some solution to get around this problem programmatically? many users can not guess about it"}}