{"action":"created","issue":{"url":"https://api.github.com/repos/sgrebnov/cordova-plugin-azure-notificationhub/issues/3","labels_url":"https://api.github.com/repos/sgrebnov/cordova-plugin-azure-notificationhub/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/sgrebnov/cordova-plugin-azure-notificationhub/issues/3/comments","events_url":"https://api.github.com/repos/sgrebnov/cordova-plugin-azure-notificationhub/issues/3/events","html_url":"https://github.com/sgrebnov/cordova-plugin-azure-notificationhub/issues/3","id":38252188,"number":3,"title":"Android notifications does not received when app in the background","user":{"login":"kant2002","id":4257079,"avatar_url":"https://avatars.githubusercontent.com/u/4257079?v=3","gravatar_id":"","url":"https://api.github.com/users/kant2002","html_url":"https://github.com/kant2002","followers_url":"https://api.github.com/users/kant2002/followers","following_url":"https://api.github.com/users/kant2002/following{/other_user}","gists_url":"https://api.github.com/users/kant2002/gists{/gist_id}","starred_url":"https://api.github.com/users/kant2002/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kant2002/subscriptions","organizations_url":"https://api.github.com/users/kant2002/orgs","repos_url":"https://api.github.com/users/kant2002/repos","events_url":"https://api.github.com/users/kant2002/events{/privacy}","received_events_url":"https://api.github.com/users/kant2002/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-07-20T06:42:20Z","updated_at":"2016-01-14T16:49:44Z","closed_at":null,"body":"Currently application on Android does not receive notifications when it is not active. If I understand current design this is expected behavior. But I think that main use-case for push notifications is to notify user about application events when user outside of the app, where application could have different notification mechanisms.\r\nI have to manually modify your plugin to use WakefulBroadcastReceiver and IntentService to be able have desired functionality.\r\nWhen I implement I broke ability to handle notifications from JS part, since showing notification happens in the new IntentService which does not have CordovaWebView instantiated.\r\n\r\nI see currently two way to improve current implementation.\r\n1. Add alternative implementation using WakefulBroadcastReceiver and IntentService and document how they could be enabled in the AndroidManifest.xml\r\n2. Instantiate CordovaWebView inside IntentService and load some limited subset of application inside that WebView. This is not very clear part for me and need discussion, but at least it could be starting point for discussion.\r\n\r\nNot sure about iOS behavior, which I will check in next couple days and will post information for discussion.\r\n\r\nI could provide patch with implementation which I have in my mind if needed.\r\n"},"comment":{"url":"https://api.github.com/repos/sgrebnov/cordova-plugin-azure-notificationhub/issues/comments/171698993","html_url":"https://github.com/sgrebnov/cordova-plugin-azure-notificationhub/issues/3#issuecomment-171698993","issue_url":"https://api.github.com/repos/sgrebnov/cordova-plugin-azure-notificationhub/issues/3","id":171698993,"user":{"login":"candidodmv","id":1034797,"avatar_url":"https://avatars.githubusercontent.com/u/1034797?v=3","gravatar_id":"","url":"https://api.github.com/users/candidodmv","html_url":"https://github.com/candidodmv","followers_url":"https://api.github.com/users/candidodmv/followers","following_url":"https://api.github.com/users/candidodmv/following{/other_user}","gists_url":"https://api.github.com/users/candidodmv/gists{/gist_id}","starred_url":"https://api.github.com/users/candidodmv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/candidodmv/subscriptions","organizations_url":"https://api.github.com/users/candidodmv/orgs","repos_url":"https://api.github.com/users/candidodmv/repos","events_url":"https://api.github.com/users/candidodmv/events{/privacy}","received_events_url":"https://api.github.com/users/candidodmv/received_events","type":"User","site_admin":false},"created_at":"2016-01-14T16:49:44Z","updated_at":"2016-01-14T16:49:44Z","body":"I've used this plugin for Anrdoid 5.0 and is working great. Try update your cordova project for the least.  I know the documentation is a little confused, but consider to use just this plugin for push notification even on the readme file makes reference to two another."}}