{"action":"created","issue":{"url":"https://api.github.com/repos/iammert/FastGCM/issues/1","labels_url":"https://api.github.com/repos/iammert/FastGCM/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/iammert/FastGCM/issues/1/comments","events_url":"https://api.github.com/repos/iammert/FastGCM/issues/1/events","html_url":"https://github.com/iammert/FastGCM/issues/1","id":98794185,"number":1,"title":"Works with services?","user":{"login":"ppamorim","id":5521682,"avatar_url":"https://avatars.githubusercontent.com/u/5521682?v=3","gravatar_id":"","url":"https://api.github.com/users/ppamorim","html_url":"https://github.com/ppamorim","followers_url":"https://api.github.com/users/ppamorim/followers","following_url":"https://api.github.com/users/ppamorim/following{/other_user}","gists_url":"https://api.github.com/users/ppamorim/gists{/gist_id}","starred_url":"https://api.github.com/users/ppamorim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppamorim/subscriptions","organizations_url":"https://api.github.com/users/ppamorim/orgs","repos_url":"https://api.github.com/users/ppamorim/repos","events_url":"https://api.github.com/users/ppamorim/events{/privacy}","received_events_url":"https://api.github.com/users/ppamorim/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-03T17:00:23Z","updated_at":"2015-08-03T22:20:44Z","closed_at":null,"body":"This can be used with services? I read the readme but it's a little bit confuse."},"comment":{"url":"https://api.github.com/repos/iammert/FastGCM/issues/comments/127420623","html_url":"https://github.com/iammert/FastGCM/issues/1#issuecomment-127420623","issue_url":"https://api.github.com/repos/iammert/FastGCM/issues/1","id":127420623,"user":{"login":"iammert","id":11799296,"avatar_url":"https://avatars.githubusercontent.com/u/11799296?v=3","gravatar_id":"","url":"https://api.github.com/users/iammert","html_url":"https://github.com/iammert","followers_url":"https://api.github.com/users/iammert/followers","following_url":"https://api.github.com/users/iammert/following{/other_user}","gists_url":"https://api.github.com/users/iammert/gists{/gist_id}","starred_url":"https://api.github.com/users/iammert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iammert/subscriptions","organizations_url":"https://api.github.com/users/iammert/orgs","repos_url":"https://api.github.com/users/iammert/repos","events_url":"https://api.github.com/users/iammert/events{/privacy}","received_events_url":"https://api.github.com/users/iammert/received_events","type":"User","site_admin":false},"created_at":"2015-08-03T22:20:44Z","updated_at":"2015-08-03T22:20:44Z","body":"I added how to use as a service. You can receive message even if your app is not running.\r\n\r\nCreate your custom service and extend it GCMListenerService. Even if you app is not running, this method is called.\r\n```java\r\npublic class CustomGCMService extends GCMListenerService{\r\n\r\n    @Override\r\n    public void onMessageReceived(String from, Bundle data) {\r\n        super.onMessageReceived(from, data);\r\n\r\n        //Here is called even app is not working.\r\n        //create your notification here.\r\n    }\r\n}\r\n```\r\n\r\nDon't forget to add service to your app xml\r\n```xml\r\n<service android:name=\".CustomGCMService\"\r\n        android:exported=\"false\">\r\n        <intent-filter>\r\n            <action android:name=\"com.google.android.c2dm.intent.RECEIVE\" />\r\n        </intent-filter>\r\n</service>\r\n```"}}