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...