ภาพรวมบริการเบราว์เซอร์สื่อ
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
คุณสร้างบริการเบราว์เซอร์สื่อได้โดยการขยายคลาส MediaBrowserServiceCompat
หรือ MediaLibraryService
ที่รองรับ จากนั้น Android
Auto และ Android Automotive OS (AAOS) จะใช้บริการของคุณเพื่อทำสิ่งต่อไปนี้ได้
นอกจากนี้ คุณยังใช้บริการเบราว์เซอร์สื่อเพื่อให้ไคลเอ็นต์อื่นๆ เข้าถึงเนื้อหาสื่อจากแอปของคุณได้ด้วย ไคลเอ็นต์สื่อเหล่านี้อาจเป็นแอปอื่นๆ ในโทรศัพท์ของผู้ใช้ หรืออาจเป็นไคลเอ็นต์ระยะไกลอื่นๆ
เนื้อหา
หน้าเหล่านี้จะอธิบายรายละเอียดวิธีใช้เบราว์เซอร์สื่อ
หลักเกณฑ์การออกแบบ
ดูข้อมูลเพิ่มเติมเกี่ยวกับหลักเกณฑ์การออกแบบได้ที่
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-22 UTC
[null,null,["อัปเดตล่าสุด 2025-08-22 UTC"],[],[],null,["# Media browser service overview\n\nYou create a media browser service by extending the supported\n[`MediaBrowserServiceCompat`](/reference/androidx/media/MediaBrowserServiceCompat) or [`MediaLibraryService`](/media/media3/session/serve-content) classes. Android\nAuto and Android Automotive OS (AAOS) can then use your service to:\n\n- Browse your app's content hierarchy to present a menu to the user.\n\n- Get the token for your app's [`MediaSessionCompat`](/reference/android/support/v4/media/session/MediaSessionCompat) object to control\n audio playback.\n\nYou can also use your media browser service to let other clients access media\ncontent from your app. These media clients might be other apps on a user's\nphone, or they can be other remote clients.\n\nContents\n--------\n\nThese pages detail how to work with the media browser:\n\n- [Media browser lifecycle](/training/cars/media/create-media-browsers/workflow)\n- [Build content hierarchy](/training/cars/media/create-media-browser/content-hierarchy)\n- [Apply content styles](/training/cars/media/create-media-browser/content-styles)\n- [Display media artwork](/training/cars/media/create-media-browser/media-artwork)\n- [Display browsable search results](/training/cars/media/create-media-browser/browsable-search)\n- [Implement custom browse actions](/training/cars/media/create-media-browser/custom-browse-actions)\n\nDesign guidelines\n-----------------\n\nTo learn more about design guidelines, see:\n\n- [Plan navigation tabs](https://developers.google.com/cars/design/create-apps/media-apps/navigation-tabs)\n- [Plan browsing views](https://developers.google.com/cars/design/create-apps/media-apps/browsing-views)"]]