Languages

Menu
Sites
Language
How to play custom sound for a notification on a Web App.

Hello,

For a web application, I want to have a custom mp3 file played when notification is triggered. the code is the same as the one on the guide :

var appControl = new tizen.ApplicationControl('http://tizen.org/appcontrol/operation/create_content',
                                              null, 'image/jpg', null, null);
var notificationGroupDict = {
    content: 'This is a notification.',
    actions: {
        soundPath: 'music/notifi.mp3',
        vibration: false,
        appControl: appControl
    }
};
var notification = new tizen.UserNotification('SIMPLE', 'My notification', notificationGroupDict);
tizen.notification.post(notification);

The notification is displayed as I want, but neither the custom sound is played (always the default sound is played), nor the vibration is deactivated, even if it's "false".

I also tried with StatusNotification instead of UserNotification but the result is the same.

I was wondering if anyone did it before, or if it's just not possible as there is a warning on the API : Warning: Some members of notification could have no effect depending on the device.

Thanks for the help.