How to keep MediaPlayer from looping ANDROID_LOOP tagged OGG files?
<p>I see that it says <a href="http://code.google.com/p/android/issues/detail?id=1320" rel="nofollow">here</a> that if the ANDROID_LOOP tag within an OGG file is set to true, it will loop endlessly like you would need for a ringtone. Is there a way to programmatically ignore this tag? The code I site here, regardless of the MediaPlayer.setLooping(false); line, will continually repeat a ANDROID_LOOP=TRUE tagged .OGG file.</p>

<pre><code>MediaPlayer mp = new MediaPlayer();
try {mp.setDataSource(context, ringtoneURI);} 
catch (IOException e) {e.printStackTrace();}
final AudioManager audioManager = (AudioManager)context.getSystemService(Context.AUDIO_SERVICE);
if (audioManager.getStreamVolume(AudioManager.STREAM_ALARM) != 0)
    {
    mp.setAudioStreamType(AudioManager.STREAM_ALARM);
    mp.setVolume(audioManager.getStreamVolume(AudioManager.STREAM_RING),audioManager.getStreamV olume(AudioManager.STREAM_RING));
    mp.setLooping(false);
    try {mp.prepare();
    } 
catch (IOException e) {e.printStackTrace();}
mp.start();
</code></pre>

<p>I know this issue will be easy to work around, but was curious if anyone knew of a direct solution. Thanks!</p>
