Complete

Cannot get location of GARMIN weather for fenix8 series devices

Hi:

When I tried to get the location of GARMIN weather for fenix843mm, it seems that cc.observationLocationName is null. Both the simulator and real fenix8 devices reported the same issue. The SDK is 7.3.0.

Moreover, Users with other devices reported that they'd encountered the same issue after they upgraded their system of the watch.

Can somebody help on it? Thanks.

for example:

if(Toybox has :Weather) {
var currentConditions=Weather.getCurrentConditions();
if (null != currentConditions) {
// city
var cc = currentConditions as Weather.CurrentConditions;
var city;

if (null != cc.observationLocationName) {
var index = cc.observationLocationName.find(",");
city = (null != index) ?
cc.observationLocationName.substring(0, index) :
cc.observationLocationName;
} else {
city = "unknown";
}
}
}

Parents
  • Seems to be a lot of reports of CIQ watchfaces crashing due to this change. I realize that this is entirely down to incorrectly written apps, but I wonder if it would’ve been better to return an empty string. (Yeah, I realize that would have consequences for apps that actually handle the null case properly, but probably aren’t expecting an empty string.)

    It’s probably a no-win situation here — I have a feeling that there will be some old/unmaintained watchfaces that will be permanently broken (but hopefully they all have the ability to turn off the weather feature so users can continue to use the watchface without experiencing constant crashes.

    I also wonder if this kind of thing merits an annoucement in the CIQ forums, so at least any developers who are watching the forums would have a heads up.

Comment
  • Seems to be a lot of reports of CIQ watchfaces crashing due to this change. I realize that this is entirely down to incorrectly written apps, but I wonder if it would’ve been better to return an empty string. (Yeah, I realize that would have consequences for apps that actually handle the null case properly, but probably aren’t expecting an empty string.)

    It’s probably a no-win situation here — I have a feeling that there will be some old/unmaintained watchfaces that will be permanently broken (but hopefully they all have the ability to turn off the weather feature so users can continue to use the watchface without experiencing constant crashes.

    I also wonder if this kind of thing merits an annoucement in the CIQ forums, so at least any developers who are watching the forums would have a heads up.

Children
No Data