Find watch face "compatability"

I am trying to build a companion app for my watch faces and am looking at a code snippet google provided for launching the Play Store link from the phone app on to the watch screen.

The code can be found here.
I’m looking at the end of the code which asks me to identify the “capability” of the watch face, which seems to be like a unique identifier or something. The code in question is this:

// Name of capability listed in Wear app’s wear.xml.
// IMPORTANT NOTE: This should be named differently than your Phone app’s capability.
private const val CAPABILITY_WEAR_APP = “verify_remote_example_wear_app”

Any idea what this is referencing or how we would get that out of WFS?

Thanks!

  • This code is for checking if your wear os “app” is installed on the watch, not a watchface; It is not necessary, the idea of a companion app is only to open google play on the watch when the user click a button on the phone app;
  • You cannot modify the code from a watchface made on WFS;
  • You probably will get more answers about developing on stackoverflow than here. There is one with code for the companion app here

Thank you! I didn’t know Android treated apps and watch faces differently. I thought a watch face was an “app.” I appreciate your code reference. I will give that a try.

We can say that a watchface is somehow part of an app. You could use that code you posted if you were “developing” your watchface… but as you are using the WFS to design it, it does not gives us access to the “code”

2 Likes