I have an mp3 file that should be played repeatedly.
I simply use this code:
mediaPlayer = MediaPlayer.create(_context, scanner);
mediaPlayer.setLooping(true);
mediaPlayer.start();
I have tested it on Android Studio simulator and it works fine, then I have tested it on my own phone and it works fine as well BUT when I connect my phone with a speaker device over Bluetooth, the sound will be played well at the first time but when it's getting replayed, it always starts after about 1 second. The duration of my mp3 file is 4 seconds. So there is always 1 second that is missing.
I have no idea what the reason for that issue could be. Is it because of my code? My speaker device? Bluetooth connection? What is it?