{"action":"created","issue":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/2221","repository_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push","labels_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/2221/labels{/name}","comments_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/2221/comments","events_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/2221/events","html_url":"https://github.com/phonegap/phonegap-plugin-push/issues/2221","id":299774146,"number":2221,"title":"Android 8 not playing sound / vibrations","user":{"login":"meisterm","id":21228656,"avatar_url":"https://avatars0.githubusercontent.com/u/21228656?v=4","gravatar_id":"","url":"https://api.github.com/users/meisterm","html_url":"https://github.com/meisterm","followers_url":"https://api.github.com/users/meisterm/followers","following_url":"https://api.github.com/users/meisterm/following{/other_user}","gists_url":"https://api.github.com/users/meisterm/gists{/gist_id}","starred_url":"https://api.github.com/users/meisterm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meisterm/subscriptions","organizations_url":"https://api.github.com/users/meisterm/orgs","repos_url":"https://api.github.com/users/meisterm/repos","events_url":"https://api.github.com/users/meisterm/events{/privacy}","received_events_url":"https://api.github.com/users/meisterm/received_events","type":"User","site_admin":false},"labels":[{"id":307723242,"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/labels/android","name":"android","color":"BFD4F2","default":false},{"id":196374009,"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-02-23T16:41:50Z","updated_at":"2018-02-24T19:25:44Z","closed_at":null,"author_association":"NONE","body":"### Expected Behaviour\r\n\r\nApp should play sound (Custom, Ringtone or default notification sound) and vibrate when notification received.\r\n\r\n### Actual Behaviour\r\n\r\nNotification is shown but no vibration and no sound is played.\r\n\r\n### Reproduce Scenario (including but not limited to)\r\n\r\nSetup a new Ionic Project with Plugin Push v2. Registration, Receiving of Push Message (showing up), Icon etc. is working. Only sound and vibration is missing.\r\nAdditionally I use the cordova-background-geolocation-lt 2.10.1 \"BackgroundGeolocation\" Plugin in my app which uses the Google Services as well.\r\n\r\n#### Steps to Reproduce \r\n\r\nNothing special. Install plugin, take my init Options and send the FCM Message.\r\n\r\n#### Platform and Version (eg. Android 5.0 or iOS 9.2.1)\r\n\r\nAndroid 8.0 with OxygenOS 5.0.2\r\n\r\n#### (Android) What device vendor (e.g. Samsung, HTC, Sony...)\r\n\r\nOne Plus 5\r\n\r\n#### Cordova CLI version and cordova platform version\r\n\r\n    cordova --version                                    # 7.1.0\r\n    cordova platform version android                     # 6.3.0\r\n\r\n#### Plugin version\r\n\r\n    cordova plugin version | grep phonegap-plugin-push   # 2.1.3\r\n\r\nGoogle-API Version: 11.6.2\r\n\r\n#### Sample Push Data Payload\r\n```\r\n{\r\n\t\"registration_ids\": [\"xxx\"],\r\n\t\"data\": {\r\n\t\t\"title\": \"Testtitle\",\r\n\t\t\"message\": \"Testmessage\"\r\n\t},\r\n\t\"priority\": \"high\"\r\n}\r\n```\r\n\r\n#### Sample Code that illustrates the problem\r\n\r\nInit Options for Push Plugin:\r\n```\r\nlet actionEinsatz: CategoryAction = {\r\n            yes: {\r\n                callback: \"accept\",\r\n                title: \"Annehmen\",\r\n                foreground: true,\r\n                destructive: false\r\n            },\r\n            no: {\r\n                callback: \"decline\",\r\n                title: \"Ablehnen\",\r\n                foreground: true,\r\n                destructive: false\r\n            },\r\n            maybe: {\r\n                callback: \"later\",\r\n                title: \"Später\",\r\n                foreground: true,\r\n                destructive: false\r\n            }\r\n        };\r\n        const options: PushOptions = {\r\n            android: {\r\n                senderID: '313658594957',\r\n                forceShow: true,\r\n                sound: true,\r\n                vibrate: true,\r\n                clearBadge: true,\r\n                iconColor: 'red',\r\n                icon: 'ambulance'\r\n            },\r\n            ios: {\r\n                alert: true,\r\n                badge: true,\r\n                sound: true,\r\n                clearBadge: true,\r\n                categories: { \"einsatz\": actionEinsatz }\r\n            },\r\n            windows: {}\r\n        };\r\n\r\n const pushObject: PushObject = this.push.init(options);\r\n```\r\n\r\n#### Logs taken while reproducing problem\r\n\r\n02-23 17:36:11.514  9927 10041 D Push_FCMService: onMessage - from: 313658594957\r\n02-23 17:36:11.516  9927 10041 D Push_FCMService: normalize extras\r\n02-23 17:36:11.516  9927 10041 D Push_FCMService: key = title\r\n02-23 17:36:11.516  9927 10041 D Push_FCMService: replace key title with title\r\n02-23 17:36:11.516  9927 10041 D Push_FCMService: no locale found for key = title, error Value Testtitle of type java.lang.String cannot be converted to JSONObject\r\n02-23 17:36:11.517  9927 10041 D Push_FCMService: key = message\r\n02-23 17:36:11.517 21010 21093 E ExecutionCriteria: Package unavailable for task: com.google.android.talk/com.google.android.apps.hangouts.concurrent.impl.GcmTriggeredNotifier{u=0 tag=\"network_connectivity_wakeup:persisted\" trigger=window{start=265018s,end=265019s,earliest=-20467370s,latest=-20467369s} requirements=[NET_CONNECTED] attributes=[PERSISTED] scheduled=-20732388s last_run=N/A jid=N/A status=PENDING retries=0 client_lib=MANCHEGO_GCM-0}\r\n02-23 17:36:11.517  9927 10041 D Push_FCMService: replace key message with message\r\n02-23 17:36:11.517  9927 10041 D Push_FCMService: no locale found for key = message, error Value Testmessage of type java.lang.String cannot be converted to JSONObject\r\n02-23 17:36:11.519  9927 10041 D Push_FCMService: background\r\n02-23 17:36:11.519  9927 10041 D Push_FCMService: message =[Testmessage]\r\n02-23 17:36:11.519  9927 10041 D Push_FCMService: title =[Testtitle]\r\n02-23 17:36:11.519  9927 10041 D Push_FCMService: contentAvailable =[null]\r\n02-23 17:36:11.519  9927 10041 D Push_FCMService: forceStart =[null]\r\n02-23 17:36:11.519  9927 10041 D Push_FCMService: create notification\r\n02-23 17:36:11.520  9927 10041 E Push_FCMService: Number format exception - Error parsing notId: s == null\r\n02-23 17:36:11.524  9927 10041 D Push_FCMService: Using channel ID = de.xxx.yyyTSLocationManager\r\n02-23 17:36:11.528  9927 10041 D Push_FCMService: stored icon=ambulance\r\n02-23 17:36:11.528  9927 10041 D Push_FCMService: stored iconColor=red\r\n02-23 17:36:11.528  9927 10041 D Push_FCMService: stored sound=true\r\n02-23 17:36:11.528  9927 10041 D Push_FCMService: stored vibrate=true\r\n02-23 17:36:11.528  9927 10041 D Push_FCMService: using icon from plugin options\r\n02-23 17:36:11.532  9927 10041 D Push_FCMService: create actions: with in-line\r\n02-23 17:36:11.533  9927 10041 W Notification: Use of stream types is deprecated for operations other than volume control\r\n02-23 17:36:11.533  9927 10041 W Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case\r\n02-23 17:36:11.541 20153 20153 D NotificationListener: onNotificationPosted# hash: 48799964 sbn: StatusBarNotification(pkg=de.xxx.yyy user=UserHandle{0} id=0 tag=YYY key=0|de.xxx.yyy|0|YYY|10225: Notification(channel=de.xxx.yyyTSLocationManager pri=0 contentView=null vibrate=default sound=content://settings/system/notification_sound tick defaults=0x2 flags=0x10 color=0xffff0000 vis=PRIVATE))\r\n02-23 17:36:11.584  2513  2513 D StatusBar: updateMediaMetaData: hasArtwork = true, 0, false, true, 8, false, false, false, 0, false\r\n"},"comment":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/comments/368252890","html_url":"https://github.com/phonegap/phonegap-plugin-push/issues/2221#issuecomment-368252890","issue_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/2221","id":368252890,"user":{"login":"meisterm","id":21228656,"avatar_url":"https://avatars0.githubusercontent.com/u/21228656?v=4","gravatar_id":"","url":"https://api.github.com/users/meisterm","html_url":"https://github.com/meisterm","followers_url":"https://api.github.com/users/meisterm/followers","following_url":"https://api.github.com/users/meisterm/following{/other_user}","gists_url":"https://api.github.com/users/meisterm/gists{/gist_id}","starred_url":"https://api.github.com/users/meisterm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meisterm/subscriptions","organizations_url":"https://api.github.com/users/meisterm/orgs","repos_url":"https://api.github.com/users/meisterm/repos","events_url":"https://api.github.com/users/meisterm/events{/privacy}","received_events_url":"https://api.github.com/users/meisterm/received_events","type":"User","site_admin":false},"created_at":"2018-02-24T19:25:44Z","updated_at":"2018-02-24T19:25:44Z","author_association":"NONE","body":"Now I have some more information:\r\n\r\nAfter checking the NotificationChannel of the GeolocationBackground Plugin I could determine that the notification sound and vibration was turned off in settings. After turning on I became sound and vibration. But only the default one. Custom Sound and Vibration Pattern didn't work.\r\n\r\nThan I removed the Geolocation completely from my app and remove and rebuild the app on the device. Now the default NotificationChannel `channel=PushPluginChannel` exists and is used when a Notification is displayed. But still custom sound and vibration doesn't work. Even creating and removing of custom NotificationChannels is not possible.  Currently I'm testing Google-Api Version 11.8.0 even without success, too."}}
{"actor":{"display_login":"meisterm"}}