We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All

Documents from this version have been archived, and will not continue to be maintained. Please use the latest version.

HMS Core ReferencesAwareness Kitawareness.statusSituation

Situation

class info
public class Situation implements Parcelable
Current weather information. The information includes the weather ID, humidity, atmospheric temperature (Celsius and Fahrenheit), somatosensory temperature (Celsius and Fahrenheit), wind direction, wind level, wind speed, atmospheric pressure, UV intensity, and update time.

Public Method Summary

Public Methods

Method
public int getWeatherId()
Obtains the weather ID. Weather IDs vary with the current weather. For example, 1 indicates sunny, 7 indicates cloudy, and 18 indicates rain. For details about the weather information of different weather IDs, please refer to WeatherId.

Return

Typedesc
intWeather ID.
Method
public String getHumidity()
Obtains the air humidity, in percentage.

Return

Typedesc
StringAir humidity, in percentage.
Method
public long getTemperatureC()
Obtains the current temperature (Celsius).

Return

Typedesc
longCurrent temperature (Celsius).
Method
public long getTemperatureF()
Obtains the current temperature (Fahrenheit).

Return

Typedesc
longCurrent temperature (Fahrenheit).
Method
public long getRealFeelC()
Obtains the somatosensory temperature (Celsius).

Return

Typedesc
longSomatosensory temperature (Celsius).
Method
public long getRealFeelF()
Obtains the somatosensory temperature (Fahrenheit).

Return

Typedesc
longSomatosensory temperature (Fahrenheit).
Method
public String getWindDir()
Obtains the wind direction. The options are NE (northeast), E (east), SE (southeast), S (south), SW (southwest), W (west), N (northern), and NW (northwest).

Return

Typedesc
StringWind direction. The options are NE (northeast), E (east), SE (southeast), S (south), SW (southwest), W (west), N (northern), and NW (northwest).
Method
public int getWindLevel()
Obtains the wind level. The value ranges from 0 to 17.  0: no wind

Return

Typedesc
intWind level. The value ranges from 0 to 17.  0: no wind
Method
public int getWindSpeed()
Obtains the wind speed (unit: km/h).

Return

Typedesc
longWind speed (unit: km/h).
Method
public long getUpdateTime()
Obtains the release time of the current weather.

Return

Typedesc
longRelease timestamp of the current weather.
Method
public long getPressure()
Obtains the atmospheric pressure, in hPa.

Return

Typedesc
longAtmospheric pressure, in hPa.
Method
public int getUxIndex()
Obtains the current UV intensity. For details about the UV light levels, please refer to WeatherStatus.

Return

Typedesc
intUV intensity.
This page may contain third-party content. For details, click here.
Search in References
Enter a keyword.