Hi, I'm just getting started with developing a watch face. So far I've figured out how to show my heart rate:
function onUpdate(dc as Dc) as Void {
var heartRate = Activity.getActivityInfo().currentHeartRate;
var heartRateText = heartRate == null ? "no hr" : heartRate.format("%d");
(View.findDrawableById("MyHeartRateLabel") as Text).setText(heartRateText);
View.onUpdate(dc);
}
Now I'd like to show the city I'm in. The documentation says Weather.getCurrentConditions().observationLocationName is deprecated. I don't know if that is what I'm looking for. Regardless, from my testing so far, observationLocationName is always null. (I've enabled the Positioning permission in the manifest and getCurrentConditions() is non-null.)
From the forums it seems like people are using the OWM API, so I went ahead and I got an API key. But beyond this, I haven't got a clue what to do next. Can anyone point me to a minimal working example to display the city/location name?
Thanks in advance!