How to receive volume changed events for the voice (in-call) stream type?
<p>I'm trying to register a broadcast receiver to handle the <code>VOLUME_CHANGED_ACTION</code> event, only for the <code>volume_voice</code> stream type (which I empirically see to be index <code>0</code> in <code>Settings.System.VOLUME_SETTINGS</code>).</p>

<p>The label <code>EXTRA_VOLUME_STREAM_TYPE</code> is hidden, so I have used the explicit string <code>"android.media.EXTRA_VOLUME_STREAM_TYPE"</code> instead. It all worked fine on Android 2.3.4 (got value <code>0</code> for <code>volume_voice</code> as expected), but on 2.3.5 the value that this extra holds is <code>10</code>, which gives an <code>ArrayIndexOutOfBoundsException</code> on <code>Settings.System.VOLUME_SETTINGS</code>.
Moreover, I see that <code>volume_voice</code> is still index <code>0</code> in <code>Settings.System.VOLUME_SETTINGS</code>.</p>

<p>Is there a more robust way to handle <code>VOLUME_CHANGED_ACTION</code> for <code>volume_voice</code> stream types?</p>

<p><strong>Edit</strong> Or any other way to do what the title asks for?</p>
