I want to run a video in the background as a standby screen, hiding player controls etc.
I want to run a video in the background as a standby screen, hiding player controls etc.
Good night, Android offers a broad API for running media, the easiest way for you to play videos is by using VideoView which is a MediaPlayer wrapper and SurfaceView.
Simple example, add the VideoView element in the xml layout and Java code:
VideoView videoView = (VideoView)
findViewById(R.id.videoView);
videoView.setVideoPath(
"uri da mídia");
MediaController mediaController = new
MediaController(this);
mediaController.setAnchorView(videoView);
videoView.setMediaController(mediaController);
videoView.start();