Reader small image

You're reading from  Android Wear Projects

Product typeBook
Published inJul 2017
Reading LevelIntermediate
PublisherPackt
ISBN-139781787123229
Edition1st Edition
Languages
Right arrow
Author (1)
Ashok Kumar S
Ashok Kumar S
author image
Ashok Kumar S

Ashok Kumar S has been working in the mobile development domain from about eight years. He is a Google certified engineer, speaker at global scale conferences and he also runs a youtube channel (AndroidABCD) for Android developers. He is an early Firebase adopter since before Google acquired Firebase. He is Computer Science and Engineering graduate who is completely passionate about innovation in technology. He contributes to open source heavily to improve his e-karma. Ashok has also written a book on Wear OS programming through a project approach.
Read more about Ashok Kumar S

Right arrow

Detecting your application from another device


In CapabilityAPI, your Wear can the corresponding mobile application for a Wear application. Wear devices can advertise their events to the paired device spontaneously and statically as well. For checking the advertised capabilities of paired Wear devices, check this link for information: https://developer.android.com/training/wearables/data-layer/messages.html#AdvertiseCapabilities.

Note

Note that not all the phones support the Play store (such as iPhones, and so on). This section describes the best practices for these scenarios: your standalone watch app needs your phone app and your phone app needs your standalone watch app.

Specifying capability names to detect your apps

For the app to each device type (watch or phone), specify a unique string for the capability name in the res/values/wear.xml file. For example, in your mobile module, the wear.xml file could include the following code in Wear and mobile modules:

<resources>
<string...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Android Wear Projects
Published in: Jul 2017Publisher: PacktISBN-13: 9781787123229

Author (1)

author image
Ashok Kumar S

Ashok Kumar S has been working in the mobile development domain from about eight years. He is a Google certified engineer, speaker at global scale conferences and he also runs a youtube channel (AndroidABCD) for Android developers. He is an early Firebase adopter since before Google acquired Firebase. He is Computer Science and Engineering graduate who is completely passionate about innovation in technology. He contributes to open source heavily to improve his e-karma. Ashok has also written a book on Wear OS programming through a project approach.
Read more about Ashok Kumar S