Skip to content Skip to sidebar Skip to footer

Oncapabilitychanged Is Not Fired On Both Handheld And Wearable While Disabling/enabling Connections

&l

Solution 1:

You need to include an android:path element that identifies the (fully-qualified) capability you're listening for:

<intent-filter><actionandroid:name="com.google.android.gms.wearable.CAPABILITY_CHANGED" /><dataandroid:host="*"android:scheme="wear"android:path="/com.mypackagename.my_capability_name"/></intent-filter>

where my_capability_name is defined in the wear.xml of your app running on the other device:

<?xml version="1.0" encoding="utf-8"?><resources><string-arrayname="android_wear_capabilities"><item>my_capability_name</item></string-array></resources>

as documented at https://developer.android.com/training/wearables/data-layer/messages.html#AdvertiseCapabilities.

A couple of caveats, however:

Post a Comment for "Oncapabilitychanged Is Not Fired On Both Handheld And Wearable While Disabling/enabling Connections"