Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WatchFaceKotlin Editing Using Galaxy Wearable Mobile Companion App #433

Open
MuhammadBemath opened this issue Jun 26, 2022 · 10 comments
Open

Comments

@MuhammadBemath
Copy link

I've duplicated the existing user styles and they work fine on the watch, but they do not appear on the Galaxy Wearable mobile companion app. It works fine for the Complications i.e. I have three complication options in the companion app. Am I missing something, or is this a bug?

@LouisCAD
Copy link
Contributor

I bet high it's a bug in Samsung's app. I also had issues with it (and decided to not rely on it as a result).

@garanj
Copy link
Contributor

garanj commented Jun 28, 2022

Hi @MuhammadBemath would you mind sharing some steps on how to replicate this, or snippets of the code you are using, to help me investigate this?

@MuhammadBemath
Copy link
Author

Hi @garanj, what I essentially did was to duplicate the variables, functions and strings for a specific user style setting (e.g. Hour pips enabled) to create a new user style setting. I tested the new user style setting on the watch by ensuring the user style settings saved. All of that seemed fine on the emulator/physical watch; however, when I tried to customise the settings via a phone using the Galaxy Wearable app, the new user style setting didn't appear.

I also tried gradually removing the functionality of one of the user style settings from the watch face sample such that it no longer worked on the watch (to see what causes the user style setting to appear on the Galaxy Wearable app), but the user style setting continued to appear on the Galaxy Wearable app even after I removed most functionality from the watch.

Let me know if you need more info, or if I should send you a modified watch face sample (I'll have to recreate it first).

@garanj
Copy link
Contributor

garanj commented Jun 29, 2022

@MuhammadBemath there is a degree of caching that occurs between the watch and the phone (I need to dig into this to understand how much), but it is a normal experience that updating the schema in the watch face on the watch will not immediately be reflected on the phone. The expectation is that there isn't much need to sync this schema so much as a developed watch face will have a generally stable schema.

What works for me in these instances is to uninstall the watch face on the watch, and reboot the phone - after that, changes are reflected in the companion app. It's not ideal, I appreciate that, and I'm going to dig into whether there are more efficient ways of doing this.

However, are you able to confirm that doing that results in your new settings being visible?

@MuhammadBemath
Copy link
Author

@garanj I've tried that but the new settings are still not visible unfortunately.

If I understand you correctly, you managed to get new settings to reflect in the companion app after following the procedure you described?

@garanj
Copy link
Contributor

garanj commented Jun 30, 2022

Yes, for me they then show up, procedure as follows:

  1. Uninstall the watch face from GW4 (long press to configure > red X > Do you want to uninstall > yes)
  2. Reboot phone
  3. Build and install watch face on GW4, with additional/modified setting
  4. Long press to configure and select watch face
  5. Load Galaxy Wear Companion
  6. Additional / modified now setting visible in Companion app

I'm taking it that this doesn't work for you?

@MuhammadBemath
Copy link
Author

No, it doesn't unfortunately.

@MuhammadBemath
Copy link
Author

Update: It seems that unpairing and re-pairing the watch from the Galaxy Wearable app resulted in some of the new settings appearing; however, a few are still missing, and the DisplayNameResourceId and DescriptionResourceId of the settings do not correspond as they are applied in UserStyleSchemaUtils.kt (the DescriptionResourceId is correct, but the DisplayNameResourceId is for a different setting).

Also, the complications previously showed up in the Wearable app, but they no longer appear.

@LouisCAD
Copy link
Contributor

@garanj

The expectation is that there isn't much need to sync this schema so much as a developed watch face will have a generally stable schema.

That expectation already doesn't match reality, starting from the developer experience, and then, do you expect us to stick to the same schema for all the subsequent releases of our app?

This "cache" thing needs to have its invalidation wired correctly. If there's a callback to retrieve it every time the watch face service starts, the OS knows that it changed, and should therefore forward it immediately to the Watch manufacturer's companion app.

@garanj
Copy link
Contributor

garanj commented Jul 14, 2022

Noted. Will explore how we can improve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants