I recently got a Nexus 4, and I've got a question regarding the volume warning that pops up if you raise the volume too much. Is it possible to disable or remove this warning? I want to be able to raise the volume with the phone in my pocket (with the volume buttons) without having to pick up the phone. I listen to podcasts with low or bad audio and need to raise it above the warning level.
Android source code explains it perfectly in AudioService.java For any experienced Android hacker, It's quite easy to patch it out though.
//========================================================================================== // Safe media volume management. // MUSIC stream volume level is limited when headphones are connected according to safety // regulation. When the user attempts to raise the volume above the limit, a warning is // displayed and the user has to acknowlegde before the volume is actually changed. // The volume index corresponding to the limit is stored in config_safe_media_volume_index // property. Platforms with a different limit must set this property accordingly in their // overlay. //========================================================================================== // mSafeMediaVolumeState indicates whether the media volume is limited over headphones. // It is SAFE_MEDIA_VOLUME_NOT_CONFIGURED at boot time until a network service is connected // or the configure time is elapsed. It is then set to SAFE_MEDIA_VOLUME_ACTIVE or // SAFE_MEDIA_VOLUME_DISABLED according to country option. If not SAFE_MEDIA_VOLUME_DISABLED, it // can be set to SAFE_MEDIA_VOLUME_INACTIVE by calling AudioService.disableSafeMediaVolume() // (when user opts out).
This seems to be an implementation of the European Union regulations to limit the volume to 85db unless the user confirms they want to raise the volume higher (BBC news article).
I guess this does not apply in the US and other regions?
It's possible that some custom ROMs may let you disable this feature.
It's possible using Xposed Framework if you have a rooted phone. Detailed instructions here: