tags:

views:

721

answers:

2

I have been developing a radio application for Symbian phones ( 2nd , 3rd and 5th editions ). It seems to me that changing the volume of the phone speaker programmatically is not straightforward.

Please help me in understanding how the phone volume could be controlled in Symbian.

Is there an API for controlling the phone volume?

I have looked at CAknVolumeControl and my impression is that its just a UI control depicting volume levels for the user to set. I think setting the phone volume to the level the user selects requires doing something more.

Please clarify

+1  A: 

You change the volume only once you've prepared the C++ object that will actually play a sound.

CMdaAudioPlayerUtility::SetVolume()

and

CMdaAudioPlayerUtility::MaxVolume()

are what you're looking for, I'd venture.

QuickRecipesOnSymbianOS
Thanks for your answer. I had a hard time finding that out in the Symbian SDK. However, now I have a user interface related problem. In S60 5th edition phones ( for example with Nokia 5800 XPressMusic ) the volume popup control comes up only when the volume hardware keys on the side of the phone is operated. I now need to know how to get that control up in my application and how to capture those volume key events.
ardsrk
You can always send simulated key strokes of the volume keys.
dudico
A: 

In the S60 SDK Extension Plugins there is the "TwoCenRepKeysToControl PhoneVolume API" that publishes two central repository keys used to control phone volume. I'm not sure will they affect the volume outside calls.

http://www.forum.nokia.com/Tools_Docs_and_Code/Tools/Extensions/S60_Extensions_Plugins/Features.xhtml

Riussi