{"action":"created","issue":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/1350","repository_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push","labels_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/1350/labels{/name}","comments_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/1350/comments","events_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/1350/events","html_url":"https://github.com/phonegap/phonegap-plugin-push/issues/1350","id":188306168,"number":1350,"title":"Not able to both update the badge and suppress the sound (when Android App is closed)","user":{"login":"robvandijk","id":697696,"avatar_url":"https://avatars.githubusercontent.com/u/697696?v=3","gravatar_id":"","url":"https://api.github.com/users/robvandijk","html_url":"https://github.com/robvandijk","followers_url":"https://api.github.com/users/robvandijk/followers","following_url":"https://api.github.com/users/robvandijk/following{/other_user}","gists_url":"https://api.github.com/users/robvandijk/gists{/gist_id}","starred_url":"https://api.github.com/users/robvandijk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robvandijk/subscriptions","organizations_url":"https://api.github.com/users/robvandijk/orgs","repos_url":"https://api.github.com/users/robvandijk/repos","events_url":"https://api.github.com/users/robvandijk/events{/privacy}","received_events_url":"https://api.github.com/users/robvandijk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-09T17:31:44Z","updated_at":"2016-11-09T19:29:51Z","closed_at":"2016-11-09T18:44:53Z","body":"### Expected Behaviour\r\nThe badge should be updated and playing a sound should be suppressed (when the App is closed).\r\n\r\n### Actual Behaviour\r\nI can either get the badge updated, or suppress the sound, but not both \r\n\r\n### Reproduce Scenario (including but not limited to)\r\nMy App is registered with FCM (not the prevous GCM). The FCM payload can contain both a notification object and a data object (see [FCM documentation](https://firebase.google.com/docs/cloud-messaging/concept-options).\r\n* If I include a data object containing the badge the badge is updated.\r\n* If I include a notification object containing sound = nil the sound is suppressed.\r\n* If I include both notification and data object the badge is not updated, but the sound is suppressed\r\n\r\n\r\n#### Platform and Version (eg. Android 5.0 or iOS 9.2.1)\r\nAndroid 6.0.1\r\n\r\n\r\n#### Cordova CLI version and cordova platform version\r\n\r\n    cordova --version      6.3.1\r\n    cordova platform version android      5.2.2\r\n\r\n#### Plugin version\r\n\r\n    cordova plugin version | grep phonegap-plugin-push   1.8.1\r\n\r\n#### Sample Push Data Payload\r\n* data:{\"message\":\"Hi\",\"badge\":22,\"icon\":\"notification\",\"title\":\"Hi\"}\r\n* notification:{\"title\":\"Hi\",\"sound\":null}\r\n\r\nIncluding the sound parameter in the data object (with values 'null' or '') and omitting the notification object does not seem to have an effect. Any ideas on how to get this done?\r\n"},"comment":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/comments/259503476","html_url":"https://github.com/phonegap/phonegap-plugin-push/issues/1350#issuecomment-259503476","issue_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/1350","id":259503476,"user":{"login":"robvandijk","id":697696,"avatar_url":"https://avatars.githubusercontent.com/u/697696?v=3","gravatar_id":"","url":"https://api.github.com/users/robvandijk","html_url":"https://github.com/robvandijk","followers_url":"https://api.github.com/users/robvandijk/followers","following_url":"https://api.github.com/users/robvandijk/following{/other_user}","gists_url":"https://api.github.com/users/robvandijk/gists{/gist_id}","starred_url":"https://api.github.com/users/robvandijk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robvandijk/subscriptions","organizations_url":"https://api.github.com/users/robvandijk/orgs","repos_url":"https://api.github.com/users/robvandijk/repos","events_url":"https://api.github.com/users/robvandijk/events{/privacy}","received_events_url":"https://api.github.com/users/robvandijk/received_events","type":"User","site_admin":false},"created_at":"2016-11-09T19:29:51Z","updated_at":"2016-11-09T19:29:51Z","body":"Hi Fred, thanks for responding. I don't think it is really specific for FCM though, GCM also accepts both data and notification payloads ([GCM docs](https://developers.google.com/cloud-messaging/concept-options). It seems that, when a notification payload is also provided, the badge in the data payload is ignored by the push plugin. Could that be the case?"}}
{"actor":{"display_login":"robvandijk"}}