Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you use MediaControllerCompat to control the current player?

My app is not the media player. I just want to be able to control the current media player using the new MediaControllerCompat class. Currently I am using MediaSessionManager but want to upgrade to the new compat classes.

How do I instantiate the MediaControllerCompat class when I don't have a token or MediaSessionCompat to instantiate it with? I am hoping to get some example code.

like image 436
timothyjc Avatar asked Apr 05 '16 07:04

timothyjc


1 Answers

I asked Ian Lake, the Google dev who did the video on MediaSessionCompat, who said it is not possible (https://www.youtube.com/watch?v=FBC1FgWe5X4). We still have to use MediaSessionManager.

like image 99
timothyjc Avatar answered Sep 18 '22 15:09

timothyjc