Weather Warning

For Android SDK v4.9

Get severe weathe warning in many countries or regions around the world, including typhoon, heat wave, cold wave, gale, heavy air pollution, wildfire, dust storms, droughts, lightning, hail, frost, heavy fog, etc.

See also Warning Info.

Weather Warning

Interface Code Interface Class
getWarning Weather Warning WarningBean



The city to be queried, support LocationID or comma-separated longitude and latitude (decimal, up to 2 decimal places), LocationID can be obtained by GeoAPI.


Multi-language setting, default Chinese, only support Chinese and English for this data. Language parameter please refer to Language

Sample Code

QWeather.getWarning(Context context, String location, final QWeather.OnResultWarningListener listener);

QWeather.getWarning(Context context, String location, Lang lang, final QWeather.OnResultWarningListener listener);


Properties of WarningBean

Property Description Example
getCode Status code, please refer to Status Code Code
getBeanBaseList Disaster Warning List<WarningBeanBase>
getRefer Reference data, includes data source, statements and license Refer
getBasic Basic Information Basic


Property Description Example
getSourcesList Data source and other statements
getLicenseList Data license commercial license


Property Description Example
getUpdateTime Last updated time 2017-10-25T04:34+08:00
getFxLink Responsive web page of this location, easy to embed in your website or APP

WarningBeanBase Warning Information

Property Description Example
getId The unique identifier of this warning, which can be used to determine whether this warning already exists.  
getPubTime Warning release time 2017-10-25T12:03+08:00
getTitle Title of warning information Shenzhen Meteorological Observatory of Guangdong Province issues yellow lightning warning
getSender Sender of warning information Shenzhen Meteorological Observatory
getStartTime Warning start time, may be null 2017-10-25T12:03+08:00
getEndTime End time of warning, may be null 2017-10-25T12:03+08:00
getStatus Warning status, may be null
active Early warning or first warning
update Warning information update
cancel cancel warning
getLevel Warning level yellow
getType Warning type 11B12
getTypeName Warning type name Raiden
getText Detailed description of the warning Shenzhen Meteorological Bureau distributed a yellow warning signal for mine-laying electricity at 12:59 on October 04. Please pay attention to defense.
getRelated Related warning id related warning id of current warning, may be null

Warning City List

Get a list of cities with current weather warnings in China and EU countries.

Interface Code Interface Class
getWarningList Weather warning city list WarningListBean



Set country or region. See supported countries or regions for Weather Warning, ISO 3166 format.

For example range=cn, range=fr

Sample Code

 * @param context context
 * @param listener network access callback interface
QWeather.getWarningList(Context context, final QWeather.OnResultWarningListListener listener);


Properties of WarningListBean

Property Description Example
getCode Status code, please refer to Status Code Code
getUpdateTime Last updated time 2017-10-25T12:34+08:00
getWarningBean Weather warning List<WarningListBean>

WarningListBeanBase Warning Information

Property Description Example
getLocationId Location ID 101280601

Warning Level and Type

See Warning Level and Type