Android Wear DocsRelease 1.1Michael HahnApril 30, 2015
Android Wear Docs, Release 1.1When the Android Wear companion app successfully pairs with the emulator, the action bar displaysEmulator Connected.On t
CHAPTER 2What About the Sample Apps?By Michael Hahn, December 2014Google provides a variety of sample applications for wearables that demonstrate the
Android Wear Docs, Release 1.14. When prompted to choose a device, select your handheld device and click OK.5. Wait for the Application to fully compi
Android Wear Docs, Release 1.12.4 Try Eliza ChatThe Eliza Chat sample app shows how you might implement a Personal Digital Assistant on a wearable dev
Android Wear Docs, Release 1.110 Chapter 2. What About the Sample Apps?
Android Wear Docs, Release 1.1Swipe left to move through the steps. For each step you can tap to view more and swipe up or down to move throughthe con
Android Wear Docs, Release 1.112 Chapter 2. What About the Sample Apps?
CHAPTER 3Android Wear SuggestBy Michael Hahn, January 2015The Suggest context stream is one of the core functions for Android Wear. It consists of a s
Android Wear Docs, Release 1.1Android Wear adds even more styles that improve the user experience on the small screen of a wearable device. Thesestyle
Android Wear Docs, Release 1.13.1.2 Modify the Handheld Activity1. Import the the packages that support wearable features into the handheld Activity.
Android Wear Docs, Release 1.13.2 ExampleThe full Android Studio project for this example is posted at https://github.com/LarkspurCA/WearableSuggest.1
CHAPTER 4Android Wear DemandBy Michael Hahn, January 2015The Demand context is one of the core functions for Android Wear. A demand is displayed as a
Android Wear Docs, Release 1.14.1.2 Modify the Handheld ActivityYour handheld activity initiates the process by creating a notification that includes a
Android Wear Docs, Release 1.1NotificationCompat.WearableExtender wearableExtender =new NotificationCompat.WearableExtender().addAction(replyAction);6
Android Wear Docs, Release 1.1Selecting the reply icon displays the voice prompt, and then the confirmation after you speak (or type on the emulator).T
CHAPTER 5Wearable Application LaunchBy Michael Hahn, April 2015Android wearable devices have an Android operating system, so you can develop applicati
Android Wear Docs, Release 1.15.3 Handheld ActivationA great way to start your wearable app is from a notification on the wearable. This is useful when
Android Wear Docs, Release 1.1for (DataEvent event : dataEvents) {// Check the event typeif (event.getType() == DataEvent.TYPE_CHANGED) {// Check the
Android Wear Docs, Release 1.124 Chapter 5. Wearable Application Launch
CHAPTER 6Data Layer MessagesBy Michael Hahn, January 2015An application that runs on a wearable device usually utilizes some of the capabilities of a
Contents1 How Does Android Wear Work? 31.1 Set Up the Development Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2
Android Wear Docs, Release 1.1name, which is essential for the wearable data layer to work.Data layer messages can originate from either a handheld or
Android Wear Docs, Release 1.1}// Data layer and lifecycle implementation (Step 2)...}2. Add callback methods for the data layer and lifecycle events.
Android Wear Docs, Release 1.1else {// Log an errorLog.v("myTag", "ERROR: failed to send Message");}}}}6.1.2 Implement a Message L
Android Wear Docs, Release 1.1}else {super.onMessageReceived(messageEvent);}}}6.1.3 Display Received MessagesThe wearable listener service cannot dire
Android Wear Docs, Release 1.1which results in duplicate local broadcasts.6.1.4 Try the First Data Layer AppMake sure the handheld and wearable are su
CHAPTER 7Data Layer DataMap ObjectsBy Michael Hahn, January 2015The wearable data layer can sync either messages or data. A message contains a single
Android Wear Docs, Release 1.1the buffer, convert it to a DataMapItem, convert that to a DataMap object, and then get the original handheld data.A Wea
Android Wear Docs, Release 1.1object that contains a golf course hole number and the distances to the front, middle, and back pin locations.The receiv
Android Wear Docs, Release 1.1NodeApi.GetConnectedNodesResult nodes = Wearable.NodeApi.getConnectedNodes(googleClient).await();for (Node node : nodes.
Android Wear Docs, Release 1.1}}}}7.1.4 Using Received DataIn this example, a background service receives the data. If you need this data in the UI or
8.4 Golf Rangefinder Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409 Contact Us 4110 Indices and tables 43i
Android Wear Docs, Release 1.136 Chapter 7. Data Layer DataMap Objects
CHAPTER 8Wearable GPSBy Michael Hahn, March 2015Wearables are great when you are on the go, especially when you are out for a run or looking for desti
Android Wear Docs, Release 1.1dependencies {compile ’com.google.android.support:wearable:1.1.0’compile ’com.google.android.gms:play-services-wearable:
Android Wear Docs, Release 1.1// Register listener using the LocationRequest objectLocationServices.FusedLocationApi.requestLocationUpdates(googleClie
Android Wear Docs, Release 1.18.2 Verify GPS SensorThis simple example works for all wearables, with or without a GPS sensor. Those without GPS must p
CHAPTER 9Contact UsAndroid Wear Docs415 [email protected]@DroidWearDocs41
Android Wear Docs, Release 1.142 Chapter 9. Contact Us
CHAPTER 10Indices and tables• genindex• search43
Android Wear Docs, Release 1.1By Michael Hahn, May 2015What is Android Wear?Android Wear is the Google API for smart watches, Google Glass, and other
Android Wear Docs, Release 1.12 Contents
CHAPTER 1How Does Android Wear Work?By Michael Hahn, December 2014The easiest way to learn how Android Wear works is to install the Android Wear compa
Android Wear Docs, Release 1.1Accept any warning or security messages displayed on either the handheld device or computer.5. Verify that the handheld
Android Wear Docs, Release 1.1Note: The adb executable is located in the Tools directory of your Android SDK. Add it to your path ifnecessary.2. Click
Kommentare zu diesen Handbüchern