Game Development Reference
In-Depth Information
You'll want consider these characteristics of the wearable operating system before you start
to develop an Android wearable app:
The wearable device's system enforces a timeout period, which means
that if you don't do anything when an activity is displayed, the device
will go into sleep mode. When it wakes back up, the Wear home screen
is displayed instead of your activity.
Consider the very small size of Wearable devices when designing a
wearable app.
Remember that users will not download apps directly onto the wearable.
Instead, you bundle the wearable app inside the Android smartphone
or tablet app. So, for instance, when users install a certain app on their
smartphone, the system automatically installs the wearable app as well.
Of course, for testing you can install the developed app directly into the
wearable device or emulator.
Let's start by setting up the wearable environment.
Setting Up the Environment
Before you start to set up the wearable app environment, keep in mind that wearable
apps can access a lot of the available standard Android APIs, but they do not support the
following APIs:
android.webkit
android.print
android.app.backup
android.appwidget
android.hardware.usb
Note
If you want to check whether your wearable device supports a certain feature, you can call
hasSystemFeature()
before trying to use an API.
Google recommends using Android Studio for Android Wear development because it provides project
setup, library inclusion, and packaging conveniences that aren't available in ADT.
Notice that all the code included in this chapter was developed, compiled and tested using
Eclipse IDE for Java Developers (eclipse-java-luna-SR1a-win32-x86_64.zip).
Your first step is to install the Android Wear system image and support packages needed by
your wearable app.