This is bad on a battery-powered device. You are burning CPU cycles and so power. You should use a Timer to control the frequency of your checking so your main thread can stop when it is not doing anything and so save power.
No - this code is not OK: some devices users report that their devices also play as the emulator: previous mp3 file is played almost to the end, then second or 2 are cut and the next mp3 in the queue is played.
But many devices play OK, one by one.
Maybe anyone who knows for now - how to play sequence of several mp3-files one by one well ?
I found that just MediaPlayer object plays files not completely !
For example, a MP3 file of 612 milliseconds it plays only up to 418 milliseconds in the emulator.
Why ?