How to play video in background with Android MediaPlayer?

I am creating a program to play videos. First, I created an Activity to play a video from a URL using Android MediaPlayer

.

My problem is the Android Home button is pressed, I want to play audio continuously (audio only), and when I return to the program, the video should play continuously.

Do you have a solution to the problem?

+3
android media-player android-mediaplayer


source to share


No one has answered this question yet

See similar questions:

1
No sound in MP4 file - Android

or similar:

3606
Close / hide Android soft keyboard
3295
Why is the Android emulator so slow? How can we speed up the development of an Android emulator?
3288
Correct use cases for Android UserManager.isUserAGoat ()?
2609
Is there a unique identifier for an Android device?
1207
Strange memory issue when loading image into Bitmap object
1111
Is abandoning the application incredulous?
1002
Grid motion detection
232
Undo Back button to act like a home button
3
Play video in the background using the media planner in the service
2
Android MediaPlayer seekTo () function is not working correctly



All Articles
Loading...
X
Show
Funny
Dev
Pics