擷取 Wear UI 畫面
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Wear OS 提供多種擷取 Wear OS UI 的方法:
- Android Studio:使用 Logcat 擷取螢幕截圖。
-
隨附應用程式:在 Google Pixel Watch 裝置上,使用「搭乘穿戴式裝置」
螢幕截圖擷取螢幕截圖的選項。
-
Wear OS 的螢幕錄影功能:錄製螢幕畫面。
在 Android Studio 中擷取螢幕截圖
使用 Android Studio 擷取穿戴式應用程式 UI 螢幕截圖的方法,與在行動裝置上擷取螢幕截圖類似。操作步驟如下:
- 在 Android Studio 中開啟應用程式。
- 在裝置或模擬器上執行應用程式。
- 前往想在裝置或模擬器上擷取的畫面。
- 開啟 Logcat,然後按一下螢幕截圖圖示。該圖示可能位於溢位選單下方。
- 視需要選取「Frame Screenshot」,然後選取圓形的 Chrome 圖示。
- 按一下「Save」。
使用隨附應用程式擷取螢幕截圖
如要擷取 Google Pixel Watch 裝置的螢幕截圖,可以使用 Google Pixel Watch 隨附應用程式。步驟如下:
- 在 UI 中找出要擷取的畫面。
- 在 Android 手機上啟用「開發人員選項」,方法是依序前往「設定」>「關於手機」,然後輕觸「版本號碼」「七次」。
- 在手機上開啟 Wear 隨附應用程式。
- 輕觸右上角的三點溢位按鈕以開啟選單。
- 輕觸「拍攝穿戴式裝置螢幕截圖」。系統隨即會顯示下列訊息:「已傳送螢幕截圖要求」。接著,您會收到以下通知:「已可傳送手錶螢幕截圖」和「輕觸即可傳送」。
- 輕觸通知即可透過藍牙、Gmail,或其他選項,接收「傳送」或「分享螢幕截圖」的選項。
使用 Wear OS 的螢幕錄影功能
如果您是在 macOS 上開發應用程式,您可以使用 GitHub 專案 (Mac 版 Android 工具) 錄製 Wear OS 裝置上的影片。
您也可以按照以下步驟,在 Wear OS 裝置上錄製影片:
- 在手錶上錄製原始畫面,如下所示:
adb shell screenrecord --time-limit 30 --output-format raw-frames --verbose /sdcard/video.raw
- 將原始檔案複製到開發機器,如下所示:
adb pull /sdcard/video.raw video.raw
- 使用
ffmpeg
將原始檔案轉換為 MP4 格式,如下所示:ffmpeg -f rawvideo -vcodec rawvideo -s 400x400 -pix_fmt rgb24 -r 10 -i video.raw -an -c:v libx264 -pix_fmt yuv420p video.mp4
注意:如需有關下載和安裝的操作說明,請造訪 FFmpeg 網站。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[[["容易理解","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-07-26 (世界標準時間)。"],[],[],null,["# Capture Wear UI screens\n\nWear OS provides several ways to capture the Wear OS UI:\n\n- **Android Studio**: use Logcat to take screenshots.\n- **Companion app** : on Google Pixel Watch devices, use the **Take wearable\n screenshot** option to take screenshots.\n- **Screen record for Wear OS**: record a video of the screen.\n\nCapture screenshots in Android Studio\n-------------------------------------\n\n\nCapturing screenshots of your wearable app's UI using Android Studio is similar to capturing\nscreenshots on mobile. Use the following steps:\n\n1. Open your app in [Android Studio](/studio).\n2. Run your app on a device or an emulator.\n3. Navigate to the screen you want to capture on the device or in the emulator.\n4. Open [Logcat](/studio/debug/am-logcat) and click the screenshot icon. It might be beneath the overflow menu.\n5. Optionally, select **Frame Screenshot** and select a round chrome.\n6. Click **Save**.\n\nCapture screenshots with the companion app\n------------------------------------------\n\n\nTo take screenshots of a Google Pixel Watch device, you can use the [Google Pixel Watch](https://play.google.com/store/apps/details?id=com.google.android.apps.wear.companion) companion app. Follow these steps:\n\n1. On your UI, find the screen that you want to capture.\n2. On the Android phone, enable **Developer options** , if you haven't already, by going to **Settings \\\u003e About phone** , and tapping **Build number** *seven times.*\n3. Open the Wear companion app on your phone.\n4. Tap the three dot overflow button in the upper-righthand corner to open the menu.\n5. Tap **Take wearable screenshot** . The following message appears: **Screenshot request sent** . Then you receive the following notifications: **Ready to send watch screenshot** and **tap to send**.\n6. Tap the notification to receive options for sending or sharing the screenshot using Bluetooth, Gmail, or other options.\n\nUse screen record for Wear OS\n-----------------------------\n\n\nIf you develop on macOS, you can use the GitHub project\n[Android tool for Mac](https://github.com/mortenjust/androidtool-mac/blob/master/README.md) to record a video from your Wear OS device.\n\n\nAlternatively, record a video from your Wear OS device using the following steps:\n\n1. Record raw frames on the watch, as shown in the following: \n\n ```text\n adb shell screenrecord --time-limit 30 --output-format raw-frames --verbose /sdcard/video.raw\n ```\n2. Copy the raw file to your development machine, as shown in the following: \n\n ```text\n adb pull /sdcard/video.raw video.raw\n ```\n3. Use `ffmpeg` to convert the raw file to MP4, as shown in the following: \n\n ```scdoc\n ffmpeg -f rawvideo -vcodec rawvideo -s 400x400 -pix_fmt rgb24 -r 10 -i video.raw -an -c:v libx264 -pix_fmt yuv420p video.mp4\n ```\n\n\n**Note:** Refer to the\n[FFmpeg website](https://www.ffmpeg.org/download.html) for download\nand installation instructions."]]