11-19-2009 03:40 PM
I need to get the current master volume on the device from my application. I tried with 3 methods but only one works, but the problem is that i need to make this work in all posible firmwares.
net.rim.device.api.system.Alert.getVolume(); //Doesn't work, always returns 100.
net.rim.device.api.system.Audio.getVolume(); //Doesn't work, always returns 100.
So i want to know if there is another way of gettting that info programatically for firmware previous to 4.7.0.
11-19-2009 04:41 PM
Assuming that you are using the Player/Manager interface to control the playback, you get a VolumeControl object from the Player:
Somthing along these lines:
m_player = Manager.createPlayer(input,"audio/mpeg"); m_player.realize(); VolumeControl volumeControl = getVolumeControl(m_player); if (volumeControl != null) volumeControl.setLevel(m_volume); m_player.prefetch(); m_player.start();