MediaPlayer class mini project

I just made a simple app to test the MediaPlayer class. You can play a song (only one mp3 I put in the resource folder for the moment) by clicking on a “Play” button, you can pause it (with the “Pause” button) and play it in a loop by activating or not a switch. You can increase or decrease volume by clicking on “+” or “-” buttons.

You can see and download the code in my Github account.

I made it to test the MediaPlayer class as a part of my android course. I plan to test more possibilities soon:

  • Showing the duration, the current time and remaining time of the song
  • Changing the “+” and “-” buttons to a slide
  • Adding a timeline showing the progression of the music
  • Possibility to click on the timeline to switch to a precise moment of the track
  • Displaying information about the song (title, group/singer, year…)
  • Choose between many songs


You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.