Issue Description
In our application, we have push notification functionality. When the app is in background and a notification is sent from the dashboard, the notification is not adding to the notification tray instead the app is getting crashed saying “App has been stopped”. But when the app is in foreground, on receiving notification app is behaving as expected.
Sample payload data:
{
"alert": "test",
"title": “Appname”,
"vibrate": true,
"icon": "push_notification_icon",
"sound": "",
"badge": "",
"ClaimID": “123456”,
"UserID": “1234566”,
"ChannelName": “mychannel”
}
But when we remove the property “sound” from the payload data, app is not getting crashed even when the app is in background.
Note: This issue is in Pixel (8.0.0 OS). In nexus(6.0.1 OS) and Samsung S4(4.4.2 OS) it is working fine.
We are using SDK 6.3.0GA, CloudPush module : 4.0.3 and Cloud module : 3.2.11.
Please download the test-case:
https://drive.google.com/file/d/1yVJ-NkICtWDZQXgLyDWstPROiyMHC0Hm/view?usp=sharing
This is the error log:
using payload:
aps_sdk: https://github.com/appcelerator/aps_sdk/pull/304 cloudpush: https://github.com/appcelerator-modules/cloudpush/pull/33
FR Passed. Check it with cloudpush prerelease 5.0.0 & ti.playservices 11.0.40. Push notifications are sent & received successfully. Also, there is no app crash in the background when sound or icon is present in the payload. Studio Ver: 4.10.0.201709271713 SDK Ver: 7.0.0.v20171114124039 OS Ver: 10.12.3 Xcode Ver: Xcode 8.3.3 Appc NPM: 4.2.10 Appc CLI: 6.3.0 Ti CLI Ver: 5.0.14 Alloy Ver: 1.10.7 Node Ver: 7.10.1 Java Ver: 1.8.0_101 Devices: ⇨ samsung SM-G955U1 --- Android 7.0
Having a custom sound in "Resources/sound/" crashes the app when push notification is sent on android 7.0 & above. Android 6.0.1 works fine.
Reopening.
cloudpush: https://github.com/appcelerator-modules/cloudpush/pull/34 aps: https://github.com/appcelerator/aps_sdk/pull/306
FR Passed. PR's merged.
Closing as fix is verified in Cloudpush 5.0.0.