I want to play device ringtones with MediaPlayer yet it seems when the metadata tag

ANDROID_LOOP = true

is set MediaPlayer is ignoring the call of the method setLooping

mMediaPlayer.setLooping(false);

and loops the audio in any case. Also the onCompletionListener method is not called.

I noticed that even audio apps like ES Media Player loop audios with this tag set to true regardless if looping is enabled or not.

So my question is if I can

  • make MediaPlayer ignoring this tag
  • temporary modify the tag so that MediaPlayer does not loop the audio

This question arose around ringtones yet it is of course not ringtone specific. Funnily the tutorials I found on how to play ringtones all set mMediaPlayer.setLooping(true); so that they dont have to handle this problem it seems ...

Thanks

enter image description here

Edit
Report