Ibm Worklight 5.0.5 - Play Custom Sound On Push Notification
When I use WL.Server.notifyAllDevices(userSubscription, { badge: 1, sound: 'notification.wav', activateButtonLabel: 'ClickMe', alert: notificationTe
Solution 1:
To use a custom notification sound:
- If the folder does not exist already, add a folder named
raw
under the existingnative\res
folder inyourProject\apps\yourApp\android\native
- Place the sound file in the
raw
folder
When sending a notification it should now play your custom sound file.
You can also place the sound file in a raw
folder under yourProject\apps\yourApp\android\nativeResources\res
; this will make sure the file will be copied to your generated Android project upon build, in case you have deleted the native
folder for whichever reason.
Post a Comment for "Ibm Worklight 5.0.5 - Play Custom Sound On Push Notification"