摘要
校园助手项目是基于Android系统开发的应用项目,通知消息模块是校园助手项目的重要模块。校园助手项目采用线程复用技术,访问网络,查询服务端通知消息数据,从而减少不断开启新线程的开销,提高资源的使用效率;项目中的通知在Android Service组件中进行处理,Service组件中开启线程访问网络,对网络返回的数据,通过Handler异步消息机制派发,然后在通知栏发出通知。这些技术的应用对设计类似的通知消息机制有广泛的参考价值。
The campus assistant project is based on the Android system development application project, and the Notification Message Module is an important module for the Campus Assistant Project. The Campus Assistant Project uses the thread reuse technology,accesses the network, and queries notification data in the service, thus reduces the expense of opening new thread, and enhances the resource efficiency. The notifications in the project are processed in the Android Service component. The Service Component opens thread to access the network. The data returned by the network is distributed with the Handler asynchronous message mechanism, and then the notification is send in the notification bar. The application of these techniques has a wide range of reference values for designing similar notification message mechanisms.
作者
李海平
陈荣征
李海文
Li Haiping;Chen Rongzheng;Li Haiwen(Information Engineering Department of Guangdong Polytechnic, Foshan 528041, Guangdong)
出处
《电脑与电信》
2016年第12期19-20,50,共3页
Computer & Telecommunication
基金
2015年度广东大学生科技创新培育专项
2016年度广东职业技术学院教学改革项目
项目编号:XJJG201608