简体   繁体   中英

Set activity audio stream to android home audio stream

I want to set my activity and the soundpool to the audio stream that I can adjust when I am on the home screen (I presume this is the main stream?).

What stream is this? What is its name?

Update:

Currently I am using the AudioManager.STREAM_MUSIC , however when I set the audio level of my phone to 0 and then open my app, the audio is level is back to 100, which I do not want.

如果您是指在主屏幕上按音量键时要调整的音量,那么很可能是铃声音量(即STREAM_RING )。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM