Dependencies and Prerequisites
- An Android Wear device
Wearable apps run directly on a watch, giving you access to hardware such as sensors and the GPU. Wearable apps are similar to other apps that use the Android SDK, but differ in design and functionality.
The following are some of the differences between phone and watch apps:
- Watch apps use watch-specific APIs, where applicable (e.g., for circular layouts, wearable drawers, ambient mode, etc.).
- Watch apps contain functionality appropriate to a watch.
Watch apps can access many standard Android APIs, but don't support the following:
You can check if a watch supports a feature by calling
hasSystemFeature()before using an API.
To conserve power on a watch, enable ambient mode in your app. A watch transitions from interactive mode to ambient mode when the watch is idle on an activity or when a user covers the screen with their palm. Watch apps that can transition into ambient mode are called always-on apps. The following describes the two modes of operation for always-on apps:
- Use full color with fluid animation in this mode. The app is also responsive to input.
- Render the screen with black and white graphics and do not present any input cues in this mode. This display mode is only supported on devices running Android 5.1 or higher.
On devices running versions prior to Android 5.1 or for apps that do not support ambient mode, when a user is idle on an activity or when the user covers the screen with their palm on an activity, the Wear home screen is displayed instead of your activity in ambient mode. If you need to show persistent content on versions prior to Android 5.1, create a notification in the context stream instead.
Note: We recommend using Android Studio for Android Wear development, as it provides project setup, library inclusion, and packaging. The rest of this training assumes you're using Android Studio.
- Creating and Running a Wearable App
- Learn how to create an Android Studio project that contains your watch app; learn how to run the app on a device or emulator.
- Standalone Apps
- Learn how to create a watch app that works independently of a phone.
- Creating Custom Layouts
- Learn how to create and display custom layouts for notifications and activities.
- Keeping Your App Visible
- Learn how to enable ambient mode for your apps, so they remain visible while still saving battery power.
- Authentication in Wear
- Learn how to manage authentication.
- Adding Voice Capabilities
- Learn how to launch an activity with voice actions and how to start the system speech recognizer app to obtain free-form voice input.
- Packaging and Distributing Wear Apps
- Learn how to package your app for direct distribution through the Play Store.
- Debugging an Android Wear App
- Learn how to set up a debugging environment for your watch app.
- Creating Android Wear Apps for China
- Learn how to support your app in China.