오디오 앱의 가장 기본적인 아키텍처는 클라이언트/서버 디자인입니다. 클라이언트는 MediaBrowser, 미디어 컨트롤러, UI가 포함된 앱의 활동입니다. 서버는 플레이어와 미디어 세션이 포함된 MediaBrowserService입니다.
MediaBrowserService는 두 가지 주요 기능을 제공합니다.
MediaBrowserService를 사용하면 MediaBrowser가 포함된 다른 구성요소 및 애플리케이션에서는 서비스를 검색하고, 자체 미디어 컨트롤러를 생성하고, 미디어 세션에 연결하고, 플레이어를 제어할 수 있습니다. 이 방식으로 Wear OS 및 Android Auto 애플리케이션이 미디어 애플리케이션에 액세스할 수 있습니다.
또한 선택적 브라우징 API를 제공합니다. 애플리케이션은 이 기능을 사용할 필요가 없습니다. 브라우징 API를 통해 클라이언트는 서비스를 쿼리하고 재생목록, 미디어 라이브러리 또는 다른 컬렉션을 나타내는 콘텐츠 계층 구조를 만들 수 있습니다.
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[],[],null,["# Audio app overview\n\nThe preferred architecture for an audio app is a client/server design. The client is an Activity in your app that includes a `MediaBrowser`, media controller, and the UI. The server is a `MediaBrowserService` containing the player and a media session.\n\nA `MediaBrowserService` provides two main features:\n\n- When you use a `MediaBrowserService`, other components and applications with a `MediaBrowser` can discover your service, create their own media controller, connect to your media session, and control the player. This is how Wear OS and Android Auto Applications gain access to your media application.\n- It also provides an optional *browsing API*. Applications don't have to use this feature. The browsing API lets clients query the service and build out a representation of its content hierarchy, which might represent playlists, a media library, or some other kind of collection.\n\n| **Note:** As is the case with media session and media controller, the recommended implementation of media browser services and media browsers are the classes `MediaBrowserServiceCompat` and `MediaBrowserCompat`, which are defined in the [media-compat support library](https://developer.android.com/topic/libraries/support-library/features.html#v4-media-compat). They replace earlier versions of the classes `MediaBrowserService` and `MediaBrowser` that were introduced in API 21. For brevity, the terms \"MediaBrowserService\" and \"MediaBrowser\" refer to instances of `MediaBrowserServiceCompat` and `MediaBrowserCompat` respectively.\n\n**[Building a media browser service](/guide/topics/media-apps/audio-app/building-a-mediabrowserservice)**\n: How to create a media browser service that contains a media session, manage client connections, and become a foreground service while playing audio.\n\n**[Building a media browser client](/guide/topics/media-apps/audio-app/building-a-mediabrowser-client)**\n: How to create a media browser client activity that contains a UI and media controller, and connect and communicate with a media browser service.\n\n**[Media session callbacks](/guide/topics/media-apps/audio-app/mediasession-callbacks)**\n: Describes how the media session callback methods manage the media session, media browser service, and other app components like notifications and broadcast receivers.\n\n**[Universal Android Music Player Sample](https://github.com/android/uamp)**\n: This GitHub sample shows how to implement a media app that allows background playback of audio, and provides a media library that is exposed to other apps."]]