android / wear-os-samples

Multiple samples showing best practices in app and watch face development on Wear OS.
https://developer.android.com/wear
Apache License 2.0
1.12k stars 573 forks source link

Documentation / comments for Capability Client with the Data Layer API #615

Closed ruben-sethi closed 1 year ago

ruben-sethi commented 1 year ago

A bit naive but I'm having some trouble understanding how to set up the capabilities across the Wear and companion apps. I see in the Wear app, there is a wear.xml that has some list declaration with a single item, but I can't quite figure out how this is used for filtering capabilities on the companion app side since there don't seem to be any references to this wear.xml resource! I wasn't able to find any other details about this anywhere either (in the developer guides or anything).

luizgrp commented 1 year ago

The wear capability declared in wear.xml file in the wear app is referenced here in the MainActivity of the mobile app.

Similarly, the mobile capability declared in wear.xml file in the mobile app is referenced here in the MainActivity of the wear app.

Details on the developer docs:

ruben-sethi commented 1 year ago

Ah, thank you so much! I really appreciate the pointers - these are super helpful! I must have been searching for the wrong terms or something like that. It ended up being a bit hard to figure out how that all ties together.