{"action":"created","issue":{"url":"https://api.github.com/repos/phonegap-build/PushPlugin/issues/85","repository_url":"https://api.github.com/repos/phonegap-build/PushPlugin","labels_url":"https://api.github.com/repos/phonegap-build/PushPlugin/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/phonegap-build/PushPlugin/issues/85/comments","events_url":"https://api.github.com/repos/phonegap-build/PushPlugin/issues/85/events","html_url":"https://github.com/phonegap-build/PushPlugin/issues/85","id":20672024,"number":85,"title":"No notifications in android when the app is closed","user":{"login":"Chexpir","id":4041868,"avatar_url":"https://avatars.githubusercontent.com/u/4041868?v=3","gravatar_id":"","url":"https://api.github.com/users/Chexpir","html_url":"https://github.com/Chexpir","followers_url":"https://api.github.com/users/Chexpir/followers","following_url":"https://api.github.com/users/Chexpir/following{/other_user}","gists_url":"https://api.github.com/users/Chexpir/gists{/gist_id}","starred_url":"https://api.github.com/users/Chexpir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chexpir/subscriptions","organizations_url":"https://api.github.com/users/Chexpir/orgs","repos_url":"https://api.github.com/users/Chexpir/repos","events_url":"https://api.github.com/users/Chexpir/events{/privacy}","received_events_url":"https://api.github.com/users/Chexpir/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":94,"created_at":"2013-10-08T11:06:06Z","updated_at":"2016-02-04T18:11:06Z","closed_at":"2013-11-11T18:07:46Z","body":"In GCMIntentService.java:73 we see they check if the app is in foreground\r\n\r\n// Send a notification if there is a message and not in foreground\r\n\t\t\tif (!PushPlugin.isInForeground() && extras.getString(\"message\").length() != 0) {\r\n\r\n, but that #79 change doesn't work correctly in android due to the ActivityManager starts the app in the moment the notification is received, thus when the app is completely closed there is no notification.\r\n\r\n10-08 11:56:16.042: I/ActivityManager(525): Start proc com.myapp.mainClass for broadcast com.myapp.mainClass/com.plugin.gcm.CordovaGCMBroadcastReceiver: pid=25076 uid=10112 gids={50112, 3003, 1028}\r\n10-08 11:56:16.072: V/GCMBroadcastReceiver(25076): onReceive: com.google.android.c2dm.intent.RECEIVE\r\n10-08 11:56:16.072: V/GCMRegistrar(25076): Setting the name of retry receiver class to com.plugin.gcm.CordovaGCMBroadcastReceiver\r\n10-08 11:56:16.072: V/GCMBroadcastReceiver(25076): GCM IntentService class: com.plugin.gcm.GCMIntentService\r\n10-08 11:56:16.082: V/GCMBaseIntentService(25076): Acquiring wakelock\r\n10-08 11:56:16.082: V/GCMBaseIntentService(25076): Intent service name: GCMIntentService-GCMIntentService-1\r\n10-08 11:56:16.092: D/GCMIntentService(25076): onMessage - context: android.app.Application@41dce920\r\n10-08 11:56:16.092: V/PushPlugin(25076): sendExtras: caching extras to send at a later time.\r\n10-08 11:56:16.092: D/GCMIntentService(25076): onMessage - foreground: true\r\n10-08 11:56:16.092: D/GCMIntentService(25076): onMessage - message: ? Peace,Love ? and PhoneGap ?!\r\n10-08 11:56:16.092: V/GCMBaseIntentService(25076): Releasing wakelock"},"comment":{"url":"https://api.github.com/repos/phonegap-build/PushPlugin/issues/comments/179974304","html_url":"https://github.com/phonegap-build/PushPlugin/issues/85#issuecomment-179974304","issue_url":"https://api.github.com/repos/phonegap-build/PushPlugin/issues/85","id":179974304,"user":{"login":"mfkenson","id":1910865,"avatar_url":"https://avatars.githubusercontent.com/u/1910865?v=3","gravatar_id":"","url":"https://api.github.com/users/mfkenson","html_url":"https://github.com/mfkenson","followers_url":"https://api.github.com/users/mfkenson/followers","following_url":"https://api.github.com/users/mfkenson/following{/other_user}","gists_url":"https://api.github.com/users/mfkenson/gists{/gist_id}","starred_url":"https://api.github.com/users/mfkenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfkenson/subscriptions","organizations_url":"https://api.github.com/users/mfkenson/orgs","repos_url":"https://api.github.com/users/mfkenson/repos","events_url":"https://api.github.com/users/mfkenson/events{/privacy}","received_events_url":"https://api.github.com/users/mfkenson/received_events","type":"User","site_admin":false},"created_at":"2016-02-04T18:11:06Z","updated_at":"2016-02-04T18:11:06Z","body":"@aorylamballe You save my days! +1\r\nmine is asus zenfone2 with auto-startup manager (this stupid security app also disable notifications from my app by default..)"}}