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

Cannot Change watch face after installing of (WatchFaceKotlin) Sample from Android Studio #1199

Open
nawinkhatiwada opened this issue Oct 25, 2024 · 6 comments

Comments

@nawinkhatiwada
Copy link

I downloaded the sample code for (WatchFaceKotlin) and successfully installed the watch face using Android Studio. However, after installation, I am unable to change another the watch face. When I attempt to long-press on the current watch face, nothing happens. The preview is also not available in watch faces list.

Additionally, I checked the Android Studio log and encountered the following error:

[WatchFacePickerFavoritesManagerImpl] mapFavoritesWithFamily(305) > Family not found for favorite=SysUiWatchFaceFavoriteInfo{id=14, watchFaceId=SysUiWatchFaceId[com.example.android.wearable.alpha,com.example.android.wearable.alpha.AnalogWatchFaceService], style={color_style_setting=[B@4a406aa, watch_hand_length_style_setting=[B@55ad29b, draw_hour_pips_style_setting=[B@2b91638}, complicationInfos=[ComplicationInfo{slotId=100, providerComponent=ComponentInfo{com.samsung.android.wearable.sysui/com.google.android.clockwork.sysui.experiences.complications.providers.DayOfWeekProviderService}, type=3, isEnabled=true}, ComplicationInfo{slotId=101, providerComponent=ComponentInfo{com.samsung.android.wearable.sysui/com.google.android.clockwork.sysui.experiences.complications.providers.BatteryProviderService}, type=3, isEnabled=true}], preview=Icon(typ=RESOURCE pkg=com.example.android.wearable.alpha id=0x7f08012c), instanceId=wfId-14, lastUpdatedAt=-1}

I am using
Samsung Galaxy watch 7 (XAWW)
Model name: SM-L300

Could someone please assist me in resolving this issue? Thank you!

@garanj
Copy link
Contributor

garanj commented Oct 25, 2024

The Galaxy Watch 7 doesn't properly support AndroidX-based watch faces. See this banner here: "As of July 10, 2024, watch faces must use the Watch Face Format in order to be installed on new watches that launch with Wear OS 5 pre-installed"

For all watch face development going forward, we recommend the Watch Face Format instead of AndroidX. Some WFF samples are available here

If you have a particular need to continue to develop watch faces with AndroidX, I'd advise using a development device that didn't come with Wear OS 5 pre-installed, for example, not a Galaxy Watch 7 or a Pixel Watch 3.

To remove the watch face, can you try adb uninstall com.example.android.wearable.alpha - does this revert you back to the default / placeholder watch face?

@nawinkhatiwada
Copy link
Author

@garanj Thank you for the prompt response.
I currently have a Wear OS app in production that utilizes the existing Watch Face Service class. The watch face collects data and syncs periodic updates to a server based on configuration changes. With the recent changes in Wear OS 5, I’m concerned about whether this approach is still supported for watch faces.
Am I now unable to achieve this functionality through watch faces in the new Wear OS? If so, what is the recommended approach for implementing this kind of data collection and syncing in Wear OS 5? Any guidance would be greatly appreciated.

@yschimke
Copy link
Contributor

You would need to split it into two separate apps.

A watchface showing the design and accessing data from the system or complications you implement.

A second app running a service (that the user is happy to run) that collects data, sends to the server and provides data to the watchface via complications.

If the user isn't motivated to let you collect this data for the watchface, then it's arguable that this change is protecting the user from unwanted data collection.

@nawinkhatiwada
Copy link
Author

nawinkhatiwada commented Oct 27, 2024

@yschimke Thank you for the detailed explanation. Are there any resources or examples you would recommend for handling the interaction between the watch face(own) and watch app (own) and the service through complications?

@yschimke
Copy link
Contributor

It's still a different user experience. So don't expect it to be as simple or smooth.

And you may need to prompt the user to install the app if the complication isn't available which means the second app isn't installed.

But essentially you can define your own default complications point at your app

https://github.com/android/wear-os-samples/blob/main/WatchFaceFormat%2FComplications%2Fwatchface%2Fsrc%2Fmain%2Fres%2Fraw%2Fwatchface.xml#L146

@nawinkhatiwada
Copy link
Author

@yschimke Thank you! I appreciate your guidance and will go through the information you've provided.

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

No branches or pull requests

3 participants