開始使用 Android 裝置上的相機和媒體
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
相機和媒體應用程式的用途相當廣泛,包括擷取內容、編輯相片、與好友分享音樂,以及在社群媒體上瀏覽影片。在這個開發人員中心,您可以找到相關資源,協助您為這些類型的用途建立、擴充、升級及最佳化應用程式。
目前,您可以在這個專區找到媒體播放和影片編輯的指南,但隨著時間推移,相機和媒體開發人員中心將會納入應用程式內擷取內容和其他相關用途的內容、建構多裝置體驗的最佳做法,以及範例應用程式程式碼的直接參照,讓您瞭解所有實際運作情形。
本節也提供相關指引,說明如何將相機功能新增至應用程式,無論是啟動意圖來啟動使用者慣用的相機應用程式,還是直接在應用程式中建構完整相機功能,都適用於這些指引。
建構應用程式
如要建構音訊或影片播放功能,建議使用 Jetpack Media3 程式庫的 ExoPlayer。
建立播放應用程式
如要建構媒體編輯功能,建議使用 Jetpack Media3 程式庫的 Transformer。
建立編輯應用程式
擴大應用程式的觸及範圍
支援更多板型規格,例如大螢幕、Wear OS、Google 助理和支援 Google Cast 的裝置,讓使用者隨時隨地都能使用您的應用程式。
前往「擴大應用程式的觸及範圍」
提升應用程式品質
導入 HDR 和空間音訊等優質媒體功能,讓應用程式從好到更好,再到最佳。接著,透過多裝置整合功能提高參與度和收益。
前往「提升應用程式等級」
最佳化以提升品質
請測試並提升應用程式的效能和穩定性,確保使用者享有優質體驗。
前往「最佳化以提高品質」
在應用程式中加入相機功能
讓應用程式能夠拍攝相片和影片,方法是將應用程式與使用者偏好的相機應用程式整合,或直接在應用程式中加入完整相機功能。
前往「新增攝影機功能」
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-08-18 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-08-18 (世界標準時間)。"],[],[],null,["# Get started with camera and media on Android\n\nCamera and media apps span a broad range of use cases, from capturing content to\nediting photos to sharing music with friends to scrolling through videos on\nsocial media. In this developer center, you'll find resources to help you\ncreate, extend, level up, and optimize your apps for these types of use cases\nand more.\n\nCurrently, you will find guidance for media playback and video editing in this\nsection, but over time the Camera and media developer center will grow to\nincorporate content for in-app capture and other relevant use cases, best\npractices as you build multidevice experiences, and direct references to sample\napp code so you can see it all in action.\n\nThis section also provides guidance on how to add camera capabilities to your\napp, whether by firing off an intent to launch the user's favorite camera app,\nor by building full camera capabilities directly into your app.\n\nBuild an app\n------------\n\nTo build audio or video playback features, we recommend using ExoPlayer from the\nJetpack Media3 library.\n\n[Create a playback app](/media/implement/playback-app)\n\nTo build media editing features, we recommend using Transformer from the Jetpack\nMedia3 library.\n\n[Create an editing app](/media/implement/editing-app)\n\nExtend your app's reach\n-----------------------\n\nReach your users where they are by adding support for more form factors like\nlarge screens and Wear OS, Google Assistant, and Cast-enabled devices.\n\n[Go to Extend your app's reach](/media/implement)\n\nLevel up your app\n-----------------\n\nTake your app from good, to better, to best by implementing premium media\nfeatures like HDR and spatial audio. Then, drive higher engagement and revenue\nwith multidevice integrations.\n\n[Go to Level up your app](/media/grow)\n\nOptimize for high quality\n-------------------------\n\nEnsure users have a great experience when using your app by testing and\ninvesting in performance and reliability.\n\n[Go to Optimize for high quality](/media/optimize)\n\nAdd camera capabilities to your app\n-----------------------------------\n\nEnable your app to capture photos and videos,\neither by integrating your app with the user's\npreferred camera app, or by adding full camera capabilities directly into\nyour app.\n\n[Go to Add camera capabilities](/media/camera/get-started-with-camera)"]]