Atul Bhardwaj Atul Bhardwaj - 1 year ago 167
Android Question

How to Control DTMF volume programmatically android

I want to make a Seek Bar that controls DTMF volume(e.g 0 to 100). I have searched a lot but could not find any thing. I am doing this but its not working..

int seekbarValue=seekBar.getProgress();
AudioManager audioManager=(AudioManager) getSystemService(Context.AUDIO_SERVICE);
audioManager.setStreamVolume(AudioManager.STREAM_DTMF, seekbarValue, 0);

Please any one tell me a solution to control DTMF volume.

Answer Source

None of the (AudioManager.STREAM_*) volumes go to 100 (int).

A valid stream volume for setStreamVolume(...) is between 0 and getStreamMaxVolume(int streamType).

Each stream can have a different max volume int, like 8, 10, or 16 from what I remember. Might even be different on different devices.

I hope that is enough to point you and future visitors in the right direction.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download