I would like to create a complication as part of a .NET watch app, which the user could optionally use in any watch face to get instant access to the app data (as a simple text label).
I know there is the Tizen.Applications.WatchfaceComplication class in Tizen.FX, but I cannot find any examples on how to use it to create a complication, respond to requests for data and make it available for watch faces.
Any info appreciated!
Hello,
Hope you are doing well. Seems there’s no Guide yet with respect to the .NET API reference of Watchfcace complication.
Please check out the guides and implementation details on the Tizen Native Guide Section: WatchFace Complications. The core process is the same. Please find the complementary .NET API functions for the Native API functions in the API references.
Watch Face Complications | Tizen Native Docs
Tizen Native API: Watchface complication
Tizen .NET API: Watchface complication
Sorry for the inconvenience. Best Regards,
Armaan Ul Islam
Samsung Developer Program
Thanks, Armaan.
So I created a complication provider in my app to respond to update requests, but I’m still confused on how to tell the complication client that data has changed so that it would request an update.
What I did was creating a static method in the provider class itself, which I’m calling from other parts in my app when the complication data has changed.
public static void Notify() {
MyComplicationProvider provider = new MyComplicationProvider(Constants.COMPLICATION_PROVIDER);
provider.NotifyUpdate();
}
However as soon as that method is called I get this error: “Invalid parameter : fail to create provider”
I don’t know if this is the correct way of using NotifyUpdate or what could be missing…
Another thing… I know this feature required Tizen API 6 so I assume that code would crash on a device with a lower level… is there a way to check if the device supports this feature before trying to call the NotifyUpdate method?
Thanks.