android 定时语音天气播报

来源:互联网 发布:php 韩顺平 百度云 编辑:程序博客网 时间:2024/05/20 16:37

记得当时毕业设计其中一项是天气预报,

当时还用自己做的天气预报去面试。因为太过简单。

由于那种强烈负罪感,这个天气预报是自己工作后1年业余时间补做的。

虽然市面上有很多天气预报了,也有定时语音播报,但是果然用自己做的别有一番成就感。


虽然简单,但是很完善。

主要功能是每天刷牙洗脸上班的时候,可以不用再去打开手机看今天天气如何了。

像听广播一样,听到有雨就带上雨伞出门。



主要功能:

除了选择指定城市外,还可以根据你的网络提供商来获取你所在的城市。

比如我当前的网络是中国上海移动提供的,我所在城市就是上海

xml解析  天气接口查询    闹钟   后台service  以及系统通知 语音播报 SharedPreferences保存数据

自己编写的网络请求TaskService队列小框架


工程编码:-GBK  代码下载:http://download.csdn.net/detail/b275518834/5351952






相关博客:/**
 * 天气接口博客 http://wmswu.iteye.com/blog/1194783 更全的
 * http://blog.csdn.net/hello_haozi/article/details/7564223
 * http://www.weather.com.cn/data/cityinfo/101010100.html
 * http://www.weather.com.cn/data/cityinfo/101010100.html
 */

所有网络接口协议// 返回当前所在城市的天气预报--新浪协议public final static String CURRENT_URL = "http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=jsunicode&ie=utf-8%22";// 6天预报: http://m.weather.com.cn/data/101010100.htmlpublic final static String WEEKWEATHER_URL = "http://m.weather.com.cn/data/[?].html";// 实时预报:http://www.weather.com.cn/data/sk/101010100.htmlpublic final static String NEWWEATHER_URL = "www.weather.com.cn/data/sk/[?].html";// 城市天气:http://www.weather.com.cn/data/sk/101010100.htmlpublic final static String WEATHERCITYINFO_URL = "http://www.weather.com.cn/data/cityinfo/[?].html";


这里可以查询城市代码



原创粉丝点击