android-mediaplayermediacontrollerandroid-mediasession

Why need to use Media controller and media session?


All most media app also need using Media COntroller and media session. I dont understand why need to use them? if i call direct to MediaPlayer, my apps will run, huh? thank you.


Solution

  • They are needed so that you can control your MediaPlayer even without using the UI,Ex : notifications, Media Buttons etc. and to keep everything in sync.

    You can read about it here : Link