Building a media browser client On this page Connect to the MediaBrowserService Customize MediaBrowserCompat.ConnectionCallback Connect your UI to the media controller Stay in sync with the media session Disconnect when the media session is destroyed. Sample code — MediaBrowserService; Sample code — MediaSession Controller Test--1----1. More from Android Developers Follow. Articles on modern tools and resources to help you build experiences. Android MediaBrowserService Sample. This sample shows how to implement a media app that allows background playback of audio, and provide a media library that is exposed to other apps. It allows other apps control media playback externally using MediaSession. This allows playback to be controlled by the Google Assistant, for example.