2

As of now, the volume can be set per Stream type. I am just wondering if there is a way to control the volume per application. For example, for this specific game application I can set to to volume level 10 without changing the volume for other application which has the same stream type.

Any feedback will be greatly appreciated.

Thanks, artsylar

artsylar
  • 2,648
  • 4
  • 34
  • 51
  • check this solution http://stackoverflow.com/questions/2539264/volume-control-in-android-application – Muhammad Zeeshan Jun 23 '11 at 11:25
  • thank you for your comment. Unfortunately, the volume setting for that application would still reflect on the system volume setting for the stream type the application is using. What I would like to know is how to set the volume for that application only without affect the system setting. – artsylar Jun 24 '11 at 03:09

1 Answers1

5

This is not supported by the OS.

You are welcome to try to fake it by remembering the current volume level, changing it, then restoring the original volume level. However, it will be impossible to cover all the cases where the volume level needs to be reset (e.g., your app crashes).

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Thanks for your comment! There is no API available to change the volume temporarily. Once you change the volume, it would be reflected to the system settings. Thanks! – artsylar Jun 24 '11 at 03:11
  • 1
    @artsylar: "There is no API available to change the volume temporarily. Once you change the volume, it would be reflected to the system settings." -- that's pretty much what I said, yes. The only volume settings *are* the ones from the system settings. As I wrote, application-specific volume settings "is not supported by the OS". – CommonsWare Jun 24 '11 at 10:21