Android: how to play music at maximum possible volume?

后端 未结 5 1534
-上瘾入骨i
-上瘾入骨i 2020-12-03 04:52

I know the question can be regarded as \"politically incorrect\", but I\'m designing an app which \"by design\" must get the attention of people within the maximum possible

5条回答
  •  孤城傲影
    2020-12-03 05:44

    That's the wrong code.

    AudioManager audioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
                                 audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC), 0);
    

提交回复
热议问题