Types of weather returned by UserContextSystem's callback.
var userContextSystem = global.userContextSystem;userContextSystem.requestWeatherCondition(function(weather) { if (weather == WeatherCondition.Sunny) { print("It's a sunny day!"); }}); Copy
var userContextSystem = global.userContextSystem;userContextSystem.requestWeatherCondition(function(weather) { if (weather == WeatherCondition.Sunny) { print("It's a sunny day!"); }});
Clear Night
Cloudy
Hail
Lightning
Low Visibility
Partly Cloudy
Rainy
Snow
Sunny
Unknown or unsupported weather condition
Windy
Types of weather returned by UserContextSystem's callback.
Example