[TIMOB-26484] Android: Add "sound" support to NotificationChannel
GitHub Issue | n/a |
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-10-26T19:33:00.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 7.5.0 |
Components | Android |
Labels | android, notification, sound |
Reporter | Joshua Quick |
Assignee | Joshua Quick |
Created | 2018-10-25T01:49:10.000+0000 |
Updated | 2018-10-29T19:43:32.000+0000 |
Description
*Summary:*
Android 8.0 and newer OS versions ignore the "sound" property assigned to individual notifications. The only way to play custom notification sounds is to assign the sound to a NotificationChannel
instead.
See sample code [^NotificationSoundTest.js] for an example on how this would work.
Note that you must assign the custom sound to both the Notification
(for Android 7.1 and below) and the NotificationChannel
(for Android 8.0 and above). It's a bummer that you have to assign it to both, but that's the only solution if you want to support customer sound on OS versions older than Android 8.0.
Attachments
PR (master): https://github.com/appcelerator/titanium_mobile/pull/10400
FR Passed. PR Merged.
Verified the fix on SDK 7.5.0.v20181026152809. Notification sound works as expected.Closing.