Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)

Creating Wearable Apps

Dependencies and Prerequisites

  • Android Studio 0.8 or later and Gradle 0.12 or later

Wearable apps run directly on the device, giving you access to hardware such as sensors and the GPU. They are fundamentally the same as apps built for other devices using the Android SDK, but differ greatly in design and usability and the amount of functionality provided. These are the main differences between handheld and wearable apps:

  • The system enforces a timeout period. If you are displaying an activity and user's don't interact with it, the device sleeps. When it wakes back up, the Wear home screen is displayed instead of your activity. If you need to show something persistent, create a notification in the context stream instead.
  • Wearable apps are relatively small in size and functionality compared to handheld apps. They contain only what makes sense on the wearable, which is usually a small subset of the corresponding handheld app. In general, you should carry out operations on the handheld when possible and send the results to the wearable.
  • Users don't download apps directly onto the wearable. Instead, you bundle the wearable app inside the handheld app. When users install the handheld app, the system automatically installs the wearable app. However, for development purposes, you can still install the wearable app directly to the wearable.
  • Wearable apps can access much of the standard Android APIs, but don't support the following APIs:

    You can check if a wearable supports a feature by calling hasSystemFeature() before trying to use an API.

Note: We recommend using Android Studio for Android Wear development as it provides project setup, library inclusion, and packaging conveniences that aren't available in ADT. The rest of this training assumes you're using Android Studio.

Lessons

Creating and Running a Wearable App
Learn how to create an Android Studio project that contains both the wearable and handheld app modules and how to run the app on a device or emulator.
Creating Custom Layouts
Learn how to create and display custom layouts for notifications and activities.
Adding Voice Capabilities
Learn how to launch an activity with a voice actions and how to start the system speech recognizer app to obtain free-form voice input.
Packaging Wearable Apps
Learn how to package a wearable app inside a handheld app. This allows the system to install the wearable app automatically when users install the companion handheld app from the Google Play store.
Debugging over Bluetooth
Learn how to debug your wearable over Bluetooth instead of USB.