I want to play an audio file when notification is posted and have written below code.
function postNotification()
{
try {
var iconPath=tizen.application.getCurrentApplication().appInfo.iconPath;
var myappInfo = tizen.application.getAppInfo();
var myAudio = document.getElementById('myAudio');
var notificationDict = {
content : "Alarm Playing",
iconPath : iconPath,
soundPath : "ab.mp3",
vibration : true,
thumbnails : "icon.png",
ledColor : "#FFFF00",
ledOnPeriod: 10000,
ledOffPeriod : 5000 ,
appId : myappInfo.id };
var myNotification = new tizen.StatusNotification("SIMPLE", "Simple notification", notificationDict);
tizen.notification.post(myNotification);
} catch (err) {
alert(err.name + ": " + err.message);
}
}
ab.mp3 are in the same folder with js file. But its not playing that audio. Can anyone help please ?