Try this , it worked for me
in yoiur manifest add the following: (my process name was QVMService,change it to yours)
AddReceiverText(QVMService, <intent-filter>
<action android:name="android.intent.action.MEDIA_BUTTON" />
</intent-filter>)
AddReceiverText(QVMService, <intent-filter>
<action android:name="android.media.VOLUME_CHANGED_ACTION" />
</intent-filter>)
example of code I was using to find the previous/new volume and type you do not need it, just check if the action was volume change, it will work even if the volume was 0 and you pressed volume down, it will have an event of volume level 0 change to volume level 0, so you are safe
I never saw the event from the media buttons, just the volume change one.
....
Dim prevVol As Int
Dim curVol As Int
Dim volType As Int
If (StartingIntent.HasExtra("android.media.EXTRA_PREV_VOLUME_STREAM_VALUE") AND StartingIntent.HasExtra("android.media.EXTRA_VOLUME_STREAM_VALUE") AND StartingIntent.Action = "android.media.VOLUME_CHANGED_ACTION") Then
prevVol = StartingIntent.GetExtra("android.media.EXTRA_PREV_VOLUME_STREAM_VALUE")
curVol = StartingIntent.GetExtra("android.media.EXTRA_VOLUME_STREAM_VALUE")
volType = StartingIntent.GetExtra("android.media.EXTRA_VOLUME_STREAM_TYPE")