Using the volume buttons in standby mode (music player style)

I need to use the volume buttons in my application while sleep mode is active (black screen, locked). I use onDispachKeyEvent to capture volume buttons and it works fine in normal condition. In the music player, if you close the screen, you can still change the volume. Any idea how to do this?

thank

+3
source share
1 answer

I recently experimented quite a bit with my HTC Desire (and this was confirmed on several phones from other suppliers).

: - , .

, - AudioManager.STREAM_MUSIC ( : , ) - , //

+2

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


All Articles