{"action":"created","issue":{"url":"https://api.github.com/repos/zo0r/react-native-push-notification/issues/161","repository_url":"https://api.github.com/repos/zo0r/react-native-push-notification","labels_url":"https://api.github.com/repos/zo0r/react-native-push-notification/issues/161/labels{/name}","comments_url":"https://api.github.com/repos/zo0r/react-native-push-notification/issues/161/comments","events_url":"https://api.github.com/repos/zo0r/react-native-push-notification/issues/161/events","html_url":"https://github.com/zo0r/react-native-push-notification/issues/161","id":169036733,"number":161,"title":"Callback not triggered when notification is opened and app is killed","user":{"login":"andy9775","id":12144493,"avatar_url":"https://avatars.githubusercontent.com/u/12144493?v=3","gravatar_id":"","url":"https://api.github.com/users/andy9775","html_url":"https://github.com/andy9775","followers_url":"https://api.github.com/users/andy9775/followers","following_url":"https://api.github.com/users/andy9775/following{/other_user}","gists_url":"https://api.github.com/users/andy9775/gists{/gist_id}","starred_url":"https://api.github.com/users/andy9775/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andy9775/subscriptions","organizations_url":"https://api.github.com/users/andy9775/orgs","repos_url":"https://api.github.com/users/andy9775/repos","events_url":"https://api.github.com/users/andy9775/events{/privacy}","received_events_url":"https://api.github.com/users/andy9775/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-08-03T03:01:00Z","updated_at":"2016-12-26T05:46:11Z","closed_at":null,"body":"I'm having an issue with the `onNotification` callback not being called if the app is killed and the notification is clicked. Is there anyway to implement this functionality in the app?\n\nRN -> 0.30.0\nreact-native-push-notification -> 2.0.2\n"},"comment":{"url":"https://api.github.com/repos/zo0r/react-native-push-notification/issues/comments/269165453","html_url":"https://github.com/zo0r/react-native-push-notification/issues/161#issuecomment-269165453","issue_url":"https://api.github.com/repos/zo0r/react-native-push-notification/issues/161","id":269165453,"user":{"login":"japesh","id":16557108,"avatar_url":"https://avatars.githubusercontent.com/u/16557108?v=3","gravatar_id":"","url":"https://api.github.com/users/japesh","html_url":"https://github.com/japesh","followers_url":"https://api.github.com/users/japesh/followers","following_url":"https://api.github.com/users/japesh/following{/other_user}","gists_url":"https://api.github.com/users/japesh/gists{/gist_id}","starred_url":"https://api.github.com/users/japesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/japesh/subscriptions","organizations_url":"https://api.github.com/users/japesh/orgs","repos_url":"https://api.github.com/users/japesh/repos","events_url":"https://api.github.com/users/japesh/events{/privacy}","received_events_url":"https://api.github.com/users/japesh/received_events","type":"User","site_admin":false},"created_at":"2016-12-26T05:46:11Z","updated_at":"2016-12-26T05:46:11Z","body":"hey @npomfret \r\nthis module works amazingly, but i am getting problem when app is closed completely. In this case the **on notification function get trigger only ones**, when notification is received. but when app is in background it trigger two times first when notification is received and second time when you click on notification.\r\n\r\nthe problem is that RNPushNotification class implements ActivityEventListener, and when application is closed their is no activity. Therefore there is no meaning of receiving call in onNewEvent function, that's what i think.\r\n\r\nhere comes the role of LifecycleEventListener it triggers it's function according to life events of activity. it trigger it's onresume function when the activity get open. therefore what is happening in onNewIntent function, i implemented in on resume function also. \r\n\r\nin this way i start getting call in onNotification function when app is closed, both times first when i receive the notification and second when notification is clicked.\r\n\r\nI will make a pull request if it worth. \r\nthank you \r\n"}}
{"actor":{"display_login":"japesh"}}