Good day, I want to ask how to easily solve when I don't get the requested data, that means responseCode = 200, so e.g. will I have the symbol "--" for the current temperature? I'm currently doing it this way, but I have no idea if it's correct for watch memory for example?
Thanks for the advice and tips.
function OWM_Update(responseCode as Number, data as Dictionary or String or Null) as Void {
if (responseCode != 200)
{
System.println("NO WEATHER DATA");
backgroundData["Temp"] = _temp;
Background.exit(backgroundData);
} else
{
System.println("WEATHER DATA OK");
backgroundData["Temp"] = ((data as Dictionary)["main"] as Dictionary)["temp"]as Number;
Background.exit(backgroundData);
}
}
