Langsung ke konten

Paling sering dikunjungi

Terakhir dikunjungi

navigation

Capturing Wear UI Screenshots

Wear OS by Google provides two ways to capture Wear UI screenshots:

  1. Use the Wear Stitch tool - Wear Stitch is a tool for capturing screenshots of watch UIs from a Wear device or the emulator. It takes multiple screenshots that are too tall to fit on the screen at once and joins them together.
  2. Use the companion app - The Take wearable screenshot option in the app lets you take screenshots of Wear UI.

This document describes both options.

Capturing screenshots using the Stitch tool

The Wear Stitch tool is an open source Python script available on GitHub at https://github.com/google/android-wear-stitch-script.

Note: You need to verify that your device instances are connected to an Adb server before using the Stitch tool. You can verify that by executing adb devices from the android_sdk/platform-tools/ directory. If connected, you'll see the device name listed as a "device."

To take a screenshot using the Stitch tool:

  1. Download the Python script from GitHub (https://github.com/google/android-wear-stitch-script).
  2. On your computer, open a Terminal window.
  3. Change to the directory where you saved wear_screenshot_stitch.py.
  4. Run the script:

    python ./wear_screenshot_stitch.py [--square] [--transparency] [--adb-args ...]

    For example:

        python ./wear_screenshot_stitch.py --square emulator-5544
    

After the script finishes executing, screenshots are output to the screencaps/ directory.

Figure 1. Sample screenshots captured with Stitch tool.

Options

The following list shows the options you can use with the Stitch tool:

--square
Assumes device has a square screen (otherwise a circular screen is assumed).
--transparency
Use alpha transparency for pixels around the corners of the output that the circular screen chops off.
--adb-args
Any arguments following this are directly passed to adb.

Note: Make sure to enclose the arguments following adb-args parameter in double-quotes. For example: python ./wear_screenshot_stitch.py --adb-args "-s 127.0.0.1:4444"

Capturing screenshots with the companion app

You can use the companion app to capture screenshots of your Wear UI by following these steps:

  1. On your Wear UI, find the screen that you want to capture.
  2. On the Android phone, enable Developer options if you haven't already, by going to Settings > About phone, and tapping Build number seven times.
  3. Open the Wear companion app on your phone.
  4. Tap the overflow button (three dots in the upper right hand corner) to open the menu.
  5. Tap Take wearable screenshot. The following dialog appears: Screenshot request sent.

    Then you receive the following notifications: Wearable Screenshot finished and tap to send.

  6. Tap the notification to receive options for sending or sharing the screenshot via Bluetooth, GMail, etc.

Figure 2. Sample screenshots captured with companion app.

Situs ini menggunakan cookies untuk menyimpan preferensi Anda tentang bahasa di situs tertentu dan opsi tampilan.

Dapatkan berita dan tips terbaru dari developer Android yang akan membantu Anda mencapai kesuksesan di Google Play.

* Wajib Diisi

Hore!

Ikuti Google Developers di WeChat

Buka situs ini dalam bahasa ?

Anda meminta halaman dalam bahasa , namun preferensi bahasa untuk situs ini adalah .

Ingin mengubah preferensi bahasa dan mengakses situs ini dalam bahasa ? Jika nanti Anda ingin mengubah preferensi bahasa, gunakan menu bahasa di bagian bawah setiap halaman.

Kelas ini memerlukan tingkat API atau yang lebih tinggi

Dokumen ini tersembunyi karena level API yang Anda pilih untuk dokumentasi ini adalah . Anda dapat mengubah level API dokumentasi dengan pemilih di atas menu navigasi sebelah kiri.

Untuk informasi lebih lanjut tentang menentukan level API yang diperlukan aplikasi Anda, baca Mendukung Versi Platform Yang Berbeda.

Take a short survey?
Help us improve the Android developer experience. (April 2018 — Developer Survey)