Complete
over 4 years ago

Not a bug.

Weather.getCurrentConditions().attribute crashes when data is not available SDK 3.2.1

I am using the brand new shiny SDK 3.2.1 weather feature which I absolutely love. However, I was dismayed when my watch face crashed in the simulator after I unchecked the "Weather Data Available" box in the settings. I was calling Weather.getCurrentConditions().temperature, and I got an unexpected type value error. When I called Weather.getCurrentConditions() instead, it recognized it as a null value and I could use an if statement to work around it. I have not tested the other weather functions or attributes.

Can the attributes for the weather functions get null values when data is not available? Thanks

Former Member
Former Member
Parents
  • Dear Jim, may I please ask? I see in ERA that users of my watch have the same error with weather, because I did not implement the check for Weather module. How is this possible, if I set in manifest that Minimum SDK version is 3.2.x, then all users should have watch firmware compatible with 3.2.x and therefore should have Weather module. As for hardware, I am supporting only Fenix 6X and Tactix Delta. So is it possible that someone can install the Watch face and may not have proper support for Weather module on his watch? Or could there by any other cause that weather is not populated into variables?

Comment
  • Dear Jim, may I please ask? I see in ERA that users of my watch have the same error with weather, because I did not implement the check for Weather module. How is this possible, if I set in manifest that Minimum SDK version is 3.2.x, then all users should have watch firmware compatible with 3.2.x and therefore should have Weather module. As for hardware, I am supporting only Fenix 6X and Tactix Delta. So is it possible that someone can install the Watch face and may not have proper support for Weather module on his watch? Or could there by any other cause that weather is not populated into variables?

Children