• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Set maximum audio level, don't need alert message

wboe

Lurker
Hi,
I wrote an audio app which should drive an external audio amplifier. In the code I set the maximum audio level:

int maxAudioVolume = audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
audioManager.setStreamVolume(AudioManager.STREAM_MUSIC,maxAudioVolume,0);

If I plug in the amplifier, then always the following alert is issued:
Raise volume above recommended level?

This is becoming irritating. Does anybody know how the alert can be avoided? Actually, this issue has been addressed often in other forums, and sometimes it was solved, but always by some app. Thus it should be possible, but the question is: how?

Wouter Boeke
 
Back
Top Bottom