| class info |
| public class Situation implements Parcelable |
| 当前天气信息。包括天气ID(CN)、湿度、摄氏度、华氏度、体感温度(℃)、体感温度(℉)、风向、风力等级、风速、气压、紫外线强度、更新时间。 |
| Return type | Method name |
| int | getCnWeatherId() |
| String | getHumidity() |
| long | getTemperatureC() |
| long | getTemperatureF() |
| long | getRealFeelC() |
| long | getRealFeelF() |
| String | getWindDir() |
| int | getWindLevel() |
| int | getWindSpeed() |
| long | getUpdateTime() |
| long | getPressure() |
| int | getUxIndex() |
| Method |
| public int getCnWeatherId() |
| 获取CN天气Id(cnWeatherId)。CN天气Id表示的是当前的天气,每个值都对应不同的天气,例如0表示晴,1表示多云,7表示小雨。更多天气ID对应的天气信息请参见CNWeatherId。 |
Return
| Type | desc |
| int | CN天气Id。 |
| Method |
| public String getHumidity() |
| 获取空气湿度值,百分制。 |
Return
| Type | desc |
| String | humidity,湿度,百分制。 |
| Method |
| public long getTemperatureC() |
| 获取当前温度,单位:摄氏度。 |
Return
| Type | desc |
| long | 当前温度,单位:摄氏度。 |
| Method |
| public long getTemperatureF() |
| 获取当前温度,单位:华氏度。 |
Return
| Type | desc |
| long | 当前温度,单位:华氏度。 |
| Method |
| public long getRealFeelC() |
| 获取体感温度,单位:摄氏度。 |
Return
| Type | desc |
| long | 体感温度,单位:摄氏度。 |
| Method |
| public long getRealFeelF() |
| 获取体感温度,单位:华氏度。 |
Return
| Type | desc |
| long | 体感温度,单位:华氏度。 |
| Method |
| public String getWindDir() |
| 获取风向,风向值有“NE(东北风向)”、“E(东风向)”、“SE(东南风向)”、“S(南风向)”、“SW(西南风向)”、“W(西风向)”、“N(北风向)”和“NW(西北风向)”八个值。 |
Return
| Type | desc |
| String | 风向,风向值有“NE(东北风向)”、“E(东风向)”、“SE(东南风向)”、“S(南风向)”、“SW(西南风向)”、“W(西风向)”、“N(北风向)”和“NW(西北风向)”八个值。 |
| Method |
| public int getWindLevel() |
| 获取风级。风级,实时天气的风级,值区间为0~17,0表示微风。 |
Return
| Type | desc |
| int | 风级,实时天气的风级,值区间为0~17,0表示微风。 |
| Method |
| public int getWindSpeed() |
| 获取风速,单位:km/h。 |
Return
| Type | desc |
| long | 风速,单位:km/h。 |
| Method |
| public long getUpdateTime() |
| 当前天气的发布时间。 |
Return
| Type | desc |
| long | 时间戳,此时天气的发布时间。 |
| Method |
| public long getPressure() |
| 获取气压,单位:百帕。 |
Return
| Type | desc |
| long | 气压,单位:百帕。 |
| Method |
| public int getUxIndex() |
| 获取当前紫外线强度,紫外线等级划分请参见WeatherStatus。 |
Return
| Type | desc |
| int | 紫外线强度。 |