1*90c8c64dSAndroid Build Coastguard Worker 2*90c8c64dSAndroid Build Coastguard Workerpage.tags="MediaBrowserService" 3*90c8c64dSAndroid Build Coastguard Workersample.group=Media 4*90c8c64dSAndroid Build Coastguard Worker@jd:body 5*90c8c64dSAndroid Build Coastguard Worker 6*90c8c64dSAndroid Build Coastguard Worker<p> 7*90c8c64dSAndroid Build Coastguard Worker 8*90c8c64dSAndroid Build Coastguard WorkerThis sample shows how to implement an audio media app that provides 9*90c8c64dSAndroid Build Coastguard Workermedia library metadata and playback controls through a standard 10*90c8c64dSAndroid Build Coastguard Workerservice. It exposes a simple music library through the new 11*90c8c64dSAndroid Build Coastguard WorkerMediaBrowserService and provides MediaSession callbacks. This allows 12*90c8c64dSAndroid Build Coastguard Workerit to be used in Android Auto, for example. 13*90c8c64dSAndroid Build Coastguard WorkerWhen not connected to a car, the app has a very simple UI that browses 14*90c8c64dSAndroid Build Coastguard Workerthe media library and provides simple playback controls. When 15*90c8c64dSAndroid Build Coastguard Workerconnected to Android Auto, the same service provides data and callback 16*90c8c64dSAndroid Build Coastguard Workerto the Android Auto UI in the same manner as it provides them to the 17*90c8c64dSAndroid Build Coastguard Workerlocal UI. 18*90c8c64dSAndroid Build Coastguard Worker</p> 19