72. Android application sound level control
To control sound level, you have to use AudioManager.
In VoIP mode,
- getStreamVolume(AudioManager.STREAM_VOICE_CALL)
- setStreamVolume(AudioManager.STREAM_VOICE_CALL, volume, AudioManager.FLAG_PLAY_SOUND)
In MP3 mode
- getStreamVolume(AudioManager.STREAM_MUSIC)
- setStreamVolume(AudioManager.STREAM_MUSIC, volume, AudioManager.FLAG_PLAY_SOUND)
Mar 4 '19 at 09:02 (GMT0) created by ProPTT2 dev
|