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";
}
}
}

  • Agreed.  But as Daisy famously said in the Great Gatsby, "It takes two to make an accident".

    While it's true that developers should be prepared to handle all values the SDK sends (and it's a shame so many are so careless), it is also true that the SDK publisher  (Garmin) can improve the end customer's experience by notifying developers when some part of the SDK is going to start behaving very differently than it used to.  

    Beyond the crashes, there are so many watch faces that depend on getting that location string as a crucial part of the UI.  (None of mine do, but I feel bad for those developers getting blindsided)

    In another life, I build integrations for software like Salesforce, and they treat their developers very well by communicating changes well in advance.  It's delightful that they really treat developers as partners.  After all, if the integrations break, it is Salesforce customers that suffer.

    That brings me back to my main point: 

    We're all in this together go provide a great customer experience for the end users.

    That means developers should heed the SDK.  And Garmin can make this all better for the end user by communicating even more proactively about changes to the SDK.

  • If this is causing apps to crash, that could indicate a bigger problem in the app.  Per the API doc, anything in currentConsitions can be null, so you want to null check everything.  For example, this has been in the doc for a long time:

    observationLocationName as Lang.String or Null

    This could vary based on where you are, time of day, date, etc, but the thing I see most often is the "feels like"  temperature is null

  • We're all in this together go provide a great customer experience for the end-users.

    I just wanted to add another voice to:

    • Customers appreciate knowing the location where their weather comes from (to know how relevant it is), so fixing this vs. deprecating it would be ideal.
    • Devs would really benefit from getting notified by email of support dropping for parts of the API.  There are so many reports of crashed CIQ watch faces on Garmin reddit lately.  Perhaps this is why?

    I signed up to receive developer emails and I can' really remember receiving anything useful like information about API changes.  Am I missing something?

  • hi, I can see the same behavior witht the SIM, with F6 for example the city name is displayed but with F8 null is returned,

    it would be great to do an annoucement about that, I've already received many mails from user about that... That is the "shame" it is deprecated, it seems many user are using it.

  • 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.