Audio Volume Control Problem (no tizen.sound?)

Audio Volume Control Problem (no tizen.sound?)

BY 17 Apr 2015 Web Application Development

Hi, I am trying to control the system volume in Gear S for my tizen app.

 

Based on the API reference and tutorial provided by Samsung, I think it can be easily implemented by:

try{
    var vol = tizen.sound.getVolume("MEDIA");
    console.log('vol = '+vol);
} catch (err){
    console.log("exception [" + err.name + "] msg[" + err.message + "]");
}

However, it seems this code doesn’t work and I get the error as “undefined’ is not an object (evaluating ‘tizen.sound.getVolume”.

After I try to check the property of tizen class by this code:

console.log('all properties: '+Object.getOwnPropertyNames(tizen));

I found there is no “sound” property in my tizen class.

The output is :(systeminfo,ApplicationControl,ApplicationControlData,application,filesystem,power,package,systemsetting,messageport,bluetooth,content,AlarmAbsolute,AlarmRelative,alarm,DownloadRequest,download,TZDate,TimeDuration,time,AttributeFilter,AttributeRangeFilter,CompositeFilter,SimpleCoordinates,SortMode,herelocation).

 

Could anyone let me know if I am anything wrong or misunderstand the API? Any help is really appreciated!

Written by