Set Email alert and incoming call ringtone
This code shows how to set email alert tone and incoming call ringtone in Tizen Web app.
//config.xml
<tizen:privilege name="http://tizen.org/privilege/filesystem.read"/>
<tizen:privilege name="http://tizen.org/privilege/setting"/>
//main.js
function onSet() {
console.log('It\'s set');
}
tizen.filesystem.resolve('music/Over the Horizon.mp3', function(musicFile) {
try {
//use INCOMING_CALL for setting Incoming call tone
tizen.systemsetting.setProperty('NOTIFICATION_EMAIL',
musicFile.toURI().replace('file://', ''), onSet);
} catch (error) {
console.log('Error: ' + error);
}
});