Pular para o conteúdo

Mais visitados

Visitados recentemente

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.

Este site usa cookies para armazenar suas preferências quanto às opções de idioma e exibição específicas ao site.

Receba as dicas e notícias mais recentes para desenvolvedores Android que ajudarão você a ter sucesso no Google Play.

* Campos obrigatórios

Uhu!

Siga o Google Developers no WeChat

Navegar neste site em ?

Você solicitou uma página em , mas sua preferência de idioma para este site está definida como .

Quer alterar sua preferência de idioma e navegar neste site em ? Para alterar a preferência de idioma depois, use o menu de idiomas na parte inferior de cada página.

É preciso ter o nível de API ou superior para esta aula

Este documento está oculto porque o nível de API selecionado para a documentação é o . Para alterar o nível, clique no seletor acima da barra de navegação esquerda.

Para mais informações sobre como especificar o nível de API que o seu app precisa, leia o artigo Compatibilidade com diferentes versões de plataforma.

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