I read that Android MediaPlayer supports audio chaining.
I am playing back a sequential midi files and I want there to be no delay between them (continuous playback).
I currently use: setOnCompletionListener
The eclipse emulator does not really have a noticeable lag. But I tried my app on an asus transformer (which is quite fast), but it had a bigger delay. I tried with Android 4.0.3.
Should I use another method to play the next song?
The Jelly Bean release notes mention that MediaPlayer now supports an ‘Audio Chaining’ feature, but don’t specify the actual API implementation. That said, if you look at the developer reference on MediaPlayer, you’ll notice that there is a new method available as of Android 16 (Jelly Bean) called ‘setNextMediaPlayer’:
Read About setNextMediaPlayer() Here
I don’t know for sure, but I believe this is what the release notes are referring to.
CORRECTION: setNextMediaPlayer is mentioned in the release notes here
http://developer.android.com/about/versions/android-4.1.html
under the heading ‘Gapless Playback’.