I want to play an MP3 file using the default Android player. I managed to play the file, but it plays in the background. I want to have all the nice controls for pause, play, etc.
My code now is something like:
String link = "http://www.example.com/file.mp3";
MediaPlayer mp = new MediaPlayer();
mp.setDataSource(link);
mp.prepare();
mp.start();
How can I make it so that when this file starts playing, it switches to another screen with the player and all the nice controls?
source
share