Together to develop Android weather software (I), android weather
Starting from today, I plan to introduce how to develop an Android weather software, which involves many basic knowledge points, it is suitable for beginners or those who are new to Android development to learn and exchange ideas!
So I will first analyze the demand of this weather software. What functions will we mainly implement?
1. query the weather information of any city in the country, province, city, and county, and switch freely
2. manually refresh Weather Information
3. Automatically refresh the weather in the background
4. automatically locate the weather information in the location
Based on the above requirement analysis, we will use Sqlite to store the list information of provinces, cities, and counties obtained from the Internet, and SharedPreference to store the weather conditions of the day for multiple times. Of course, we also need to use the Http protocol to obtain weather information. We will call the API of the China weather service. In addition, we will use Service and Recevier to automatically refresh the interface in the background and implement the following interface.
In addition, we will also apply some popular open-source frameworks on Git, such as LitePal. You can refer to the blog posts written by the big God Guo and parse Json data by Gson, this is the end of today's demand analysis and feature specifications, and the next blog will soon meet you.
Below is the application's Git Open Source Address, https://github.com/melhc/SimpleWeather