开发者

How to reduce in-call volume (lower than 0) in android?

开发者 https://www.devze.com 2023-02-08 05:31 出处:网络
My problem is the lowest volume in in-call mode still loud. So I try this code AudioManager audio = (AudioManager)getSystemService(Context.AUDIO_SERVICE);

My problem is the lowest volume in in-call mode still loud.

So I try this code

AudioManager audio = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
audio.setStreamVolume(audio.STREAM_VOICE_CALL, -1, 0);

But not effect, In-call volume开发者_开发百科 is set to 0 and still loud.

Have any idea ?

Thank you.


If u r trying to silent the phone then try this out:

AudioManager audio = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); audio.setRingerMode(AudioManager.RINGER_MODE_SILENT);

and to enable volume:

audio.setRingerMode(AudioManager.RINGER_MODE_NORMAL);

0

精彩评论

暂无评论...
验证码 换一张
取 消