How to reduce incoming call volume (below 0) in Android?

My problem is the lowest volume level in call mode. So i try this code

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

But it doesn’t work, the volume in the conversation is set to 0 and is still louder.
Any ideas?

Thank.

+3
source share
1 answer

If you are trying to disconnect the phone, try this:

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

and turn on the volume:

audio.setRingerMode (AudioManager.RINGER_MODE_NORMAL);

0
source

Source: https://habr.com/ru/post/1789432/


All Articles