MediaPlayer in Android

Android provides many way to control playback to audio and video, one of those ways is using “MediaPlayer Class”. Inorder to use this first we have to create the MediaPlayer class, where we have second parameter the song which we want to play. We have to place the song inside raw folder created inside resource folder within our application ==>”MusicPlayer\app\src\main\res\raw”.

How To Create a “raw folder” in Android Studio: see here…

Some of the methods related to MediaPlayer Class:

In Java File

In xml File:

One thought on “MediaPlayer in Android”

  1. Your mode of telling all in this post is actually nice, every one be able to easily understand it, Thanks a lot.

Leave a Reply

Your email address will not be published. Required fields are marked *