From today onwards, intends to introduce how to develop an Android weather software, which applied to the basic knowledge points are more, more suitable for beginners or just contact with the development of Android soon students to learn to exchange and talk!
So I first to the Weather software requirements analysis, we will mainly achieve what function?
1. Inquire about the weather information of any city in cities and counties of the country and can switch freely
2, manually refresh the weather information
3, the background automatically refresh the weather
4, the location of the automatic location of the weather information
Based on the above requirement analysis, we will use SQLite to store the list information of the national provinces and counties obtained from the network, and use Sharedpreference to store the weather conditions of the day and make it easier to view. And, of course, using the HTTP protocol to get weather information, we'll call the API interface of the China weather Bureau. In addition, we will use the service and recevier to implement the function of the background auto-refresh interface, and implement the interface as shown below.
In addition, we will also apply to some git popular open source framework, such as Litepal, this framework you can see the Guo Lin written blog, Gson parse JSON data and so on, today's requirements analysis and functional specifications to this end, the next blog will soon meet with you.
Here is the Git open source address for the app, Https://github.com/melhc/SimpleWeather
One up to develop the weather software for Android (i)