Is it possible to register a BroadcastReceiver or something to get notifications of media player volume changes?
Thanks
Go to Settings. Depending on your phone's Android version, do one of the following: Tap Sound > Advanced > Default notification sound. Tap Sound & notification > Notification sound.
Change your notification soundOpen your phone's Settings app. Default notification sound. Choose a sound. Tap Save.
Open your device's Settings app . Sound Notifications. Settings . Tap Notification preferences.
If your phone is paired to more than one Bluetooth device, you can change where you hear music, videos, and games. Under "Media volume," tap Play media to. When you press a volume button, the volume that changes depends on what you're doing. For example, if you're watching a movie, the movie volume changes.
Immediate value you can get if you use AudioManager
AudioManager mAudioManager = Context.getSystemService(Context.AUDIO_SERVICE);
mAudioManager.getStreamVolume(STREAM_MUSIC);
The only function that gives you opportunity to register broadcast receiver is
mAudioManager.registerMediaButtonEventReceiver(audioBroadcastReceiver);
where audioBroadcastReceiver extends BroadcastReceiver and must be declared in the application manifest.
Not sure if this is exactly what you were looking for.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With