3 ms·
Services cannot listen for keypresses, but can't they change the volume? Why not have the service periodically check the volume and reset it to max automaticall
by jsight 15y ago
Services cannot listen for keypresses, but can't they change the volume? Why not have the service periodically check the volume and reset it to max automatically?
Ie, something like:
// Get the AudioManager
AudioManager audioManager =
(AudioManager)this.getSystemService(Context.AUDIO_SERVICE);
// Set the volume of played media to maximum.
audioManager.setStreamVolume (
AudioManager.STREAM_MUSIC,
audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC),
0);
Unless there are more requirements here that I am missing, this sounds achievable without root.
- kruhft 15y agoYes, that could be an idea I could try. Thanks.