The Weather app for Android

Source: Internet
Author: User

Make a weather information APP that provides real-time weather updates by reading publicly released meteorological data to help users stay informed about the weather. By using the app, you can find the weather forecast in your location, or you can get the meteorological environment information in any location in the province by locating the system.

API interface:

1, query the interface of the weather Baidu Car network apihttp://developer.baidu.com/map/carapi-7.htm

Read the weather information over the network and save it to the SQLite database.

The JSON returned by the weather query:

JSON return Example: {errnum:0, ErrMsg: "Success", Retdata: [{province_cn: "Beijing",//province Distr ICT_CN: "Beijing",//City NAME_CN: "Chaoyang",//District, County Name_en: "Chaoyang",//City Pinyin area_id: "101010            300 "//City Code}, {province_cn:" Liaoning ", District_cn:" Chaoyang ", Name_cn:" Chaoyang ", Name_en: "Chaoyang", area_id: "101071201"}, {province_cn: "Liaoning", Di        STRICT_CN: "Chaoyang", Name_cn: "Lingyuan", Name_en: "Lingyuan", area_id: "101071203"},            {province_cn: "Liaoning", District_cn: "Chaoyang", NAME_CN: "Kabul Left", Name_en: "Kazuo", area_id: "101071204"}, {province_cn: "Liaoning", District_cn: "Chaoyang", Nam E_CN: "Beipiao", Name_en: "Beipiao", area_id: "101071205"}, {province_cn: "Liaoning" , DISTRICT_CN: "Chaoyang", Name_cn: "Jianping County", name_en: "Jianpingxian", area_id: "101071207"}]} Remarks: Die Paste query weather supported cities the city's administrative level can be: Province, city, district and county, is fuzzy query, not fixed specific administrative level, matching the name is. Eg: "Chaoyang": Can be found in Beijing's "Chaoyang District", can also be found in Liaoning Chaoyang. Return value Description: {errnum:0,//Return result status code errmsg: "Success",//Return result description Retdata: [{province_cn: "Beijing",//            Province district_cn: "Beijing",//City NAME_CN: "Chaoyang",//District, County Name_en: "Chaoyang",//city Pinyin area_id: "101010300"//City Code},

Operating effect:

The Weather app for Android

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.