A MediaController is a view containing controls for a MediaPlayer. Typically contains the buttons like "Play/Pause", "Rewind", "Fast Forward" and a progress slider. It takes care of synchronizing the controls with the state of the MediaPlayer.
Questions tagged [mediacontroller]
303 questions
4
votes
2 answers
Using MediaController on Android 5
I want to use the new MediaController in Android 5 instead of the old RemoteController for getting the currently playing track and changing the track.
I couldn't find any examples so I tried it by myself.
To get the current MediaController, I have…

Martin
- 155
- 1
- 8
4
votes
1 answer
Android MediaController Play/Pause button and Seekbar doesn't Refresh
I am using MediaController.MediaPlayerControl in order to display a MediaController at the bottom of my Custom View but I can't get it to work properly. When I play music for first time then there should be pause button visible but instead there is…

user221458
- 716
- 2
- 7
- 17
4
votes
1 answer
MediaPlayer MediaController Service
I cannot seem to fix this problem:
android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?
I have an application which has an activity hosting a fragment which has a MediaController. …

Nath5
- 1,665
- 5
- 28
- 46
4
votes
2 answers
Change colour of text in android mediacontroller
Hi is there a way of changing the colour of the text in a mediacontroller showing the total time and remaining time of an audio file. On android 2.3 the times are clearly visible but when my app is run on android 4.0 or 4.1 the text showing the…

Will
- 1,487
- 1
- 23
- 35
4
votes
2 answers
Add view on top of MediaController
MediaController always shown on top of all views in the screen and do not pass clicks to below views until it is hidden, my issue is:
How to add button view on top of MediaController so it handle click events ?
OR
How to pass click events to below…

Alex
- 1,068
- 8
- 23
4
votes
1 answer
Back button won't work when VideoView is playing video
I have a VideoView in one of my Activities and if I try to press the back Button it doesn't take me to the previous Activity and it doesn't give any error messages in the log cat either.
I have tried overriding the onBackPressed() method and I have…

RagHaven
- 4,156
- 21
- 72
- 113
3
votes
4 answers
Android - Media controller doesn't show up
I have a videoView where I show a video and I want to show the default media controllers. For some reason the controllers don't seem to want to show up.
I have tried creating the MediaController with xml, setting it to be always visible, attaching…

Sotiris Falieris
- 911
- 1
- 10
- 18
3
votes
2 answers
Android: How to use mediaController in service class?
I have a app that plays radio via MediaPlayer as a service. Is it possible to use MediaController in Service class?
The problem is that I can use findViewById.
I try to get my LinearLayout in onPrepeared methiod ...
public class RadioPlayer extends…

Krzysztof Kubacki
- 75
- 2
- 6
3
votes
3 answers
android mediaplayer mediacontroller timeout
Ive implemented a mediaplayer and mediacontroller that streams a mp3 url. However my device on the TMobile network doesnt get a great 3G signal so it operates on EDGE. Im assuming that the mediaplayer is crashing because the stream is too slow or…

Robert de Klerk
- 624
- 3
- 12
- 24
3
votes
1 answer
Crash on MediaController.show()
i've a problem with mediacontroller, this part of code works perfecty on different devices as Acer Liquid (gingerbread), Archos 43 (froyo) e Archos 32 (froyo)...
VideoView videoView = (VideoView) findViewById(R.id.videoView1);
MediaController…

Vlatego
- 588
- 1
- 6
- 15
3
votes
2 answers
2 Videos 1 MediaController
I wish to display 2 video views side by side. I do not wish to implement custom MediaController because the default is very good, but, no matter what I did I could not control 2 videos simultaneously.
val mediaController =…

Dim
- 4,527
- 15
- 80
- 139
3
votes
1 answer
redraw MediaController controls
Is their a way to redraw the MediaController controls when rotating the device? I am already overriding the onConfigurationChanged() method. I just don't know of the method to redraw the controls.
The reason for me wanting to do this is when I…

Ronnie
- 11,138
- 21
- 78
- 140
3
votes
0 answers
How to set secondary progress in Mediacontroller progressbar in android?
I would like to know how to set secondary progress in Mediacontroller progressbar in android? Is it possible? Automatically the primary progress is getting updated with the playing info.

Navaneeth Sen
- 6,315
- 11
- 53
- 82
3
votes
1 answer
MediaControllerCompat's getMetadata returns null
I'm trying to make a audio app in Android using this video as a guide, and I'm having trouble with creating the notification using the audio's metadata.
Here is the code I use to extract the audio files from the device:
public void loadData() {
…

Jerryq27
- 159
- 1
- 14
3
votes
5 answers
ViewPager showing Mediacontrols on Imageview ahead of VideoView
Gallery feature:
I am developing a feature similar to Gallery, where users can swipe to see image or video uploaded by them.
Problem :
Whenever there is video after imageview, Mediacontrols for videoview is getting displayed on imageview for about…

Ashish Shukla
- 1,027
- 16
- 36