Note: This content is from: https://developer.android.com/training/wearables/apps/index.html
Translation level is limited, if there is omission, welcome criticism advice.
ren: the Hermit
Create wearables apps creating wearable apps
Wearable apps run directly on the device, giving your access to hardware such as sensors and the GPU. They is fundamentally the same as apps built for other devices using the Android SDK, but differ greatly in design and US Ability and the amount of functionality provided. These is the main differences between handheld and wearable apps:
Wearable apps run directly on the device, allowing you to access hardware such as sensors and GPUs. They are essentially the same applications that run on other devices and use the Android SDK, but differ greatly in the amount of design, availability, and functionality available. The following are the main differences between handheld devices and wearable devices:
- Wearable apps is 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. Should carry out operations on the handheld when possible and send the results to the wearable.
Wearables applications have smaller sizes and fewer features than handheld devices. They only contain the creative concept of wearables, which is usually the equivalent of a smaller subset of handheld device applications. In general, you should operate on a handheld device as much as possible and send the results to a wearable device.
- 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.
The user does not download the app directly on the wearable device. As an alternative, you will be binding wearables applications in handheld applications. When the user installs the handheld device application, the system automatically installs the application on the wearable device. However, in order to develop the application, you can also install directly on the wearable device application.
Wearables apps can access more standard Android APIs, in addition to the following APIs:
-
android.webkit
android.print
android.app.backup
android.appwidget
android.hardware.usb
You can check if a wearable supports a feature by the calling before trying to the use of an hasSystemFeature()
API.
Before using an API, you can call Hassystemfeature () to check if the wearable device supports this feature.
To conserve power on a wearable device, you can enable the ambient mode for your Wear app. Devices transition from Interactive To ambient mode when the user was idle on a activity or when the user covers the screens with their palm. Wearable apps that can transition into ambient mode is called always-on apps. The following describes the modes of operation for always-on apps:
To keep your wearable device's power, you can adapt your wear app to the environment. When a user's activity is idle, or when the user transforms the screen with the palm of the hand, the device transitions from the environment to the interaction mode. Wearable apps that can be transformed into an environment model are called by always-on applications.
Android Wear development: Creating wearables apps-Creating wearable apps