Skip to content Skip to sidebar Skip to footer

Android: Mediaplayer Play, Pause, Resume Audio File Like Whatsapp

I'm working on one project, I tried to play audio files like WhatsApp. suppose three files in a row sent by the user, ** I want to play/pause/resume audio file exactly like WhatsAp

Solution 1:

This is the mediaplayer I had written a few years back.

This has an option to play a playlist. It has Play, Pause, Next, Prev buttons and their actions too.

You can modify the app as per your need. You can show your playlist in a recyclerview and then on item click you can send the item as a broadcast to play.

Let me know if you need more help.

Solution 2:

You can store the position of currently running video.Then if you are playing another video, then stop the video of stored position and update the position.

For resuming video, You can store the running time of the video by having a parameter in your model file.You can resume the video from where you stop it.

Here is the description for resuming vdo

How to stream a video to play from a particular time in android?

Post a Comment for "Android: Mediaplayer Play, Pause, Resume Audio File Like Whatsapp"