基于线程复用的Android校园 助手的通知模块设计

李海平, 陈荣征, 李海文

电脑与电信 ›› 2016, Vol. 1 ›› Issue (12) : 19-20.

电脑与电信 ›› 2016, Vol. 1 ›› Issue (12) : 19-20.
基金项目

基于线程复用的Android校园 助手的通知模块设计

  • 李海平,陈荣征,李海文
作者信息 +

Notification Message Module Design for Android Campus Assistant Based on Thread Reuse

  • Li Haiping,Chen Rongzheng,Li Haiwen
Author information +
文章历史 +

摘要

校园助手项目是基于Android 系统开发的应用项目,通知消息模块是校园助手项目的重要模块。校园助手项 目采用线程复用技术,访问网络,查询服务端通知消息数据,从而减少不断开启新线程的开销,提高资源的使用效率;项目中的 通知在Android Service 组件中进行处理,Service 组件中开启线程访问网络,对网络返回的数据,通过Handler 异步消息机制派 发,然后在通知栏发出通知。这些技术的应用对设计类似的通知消息机制有广泛的参考价值。

Abstract

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.

关键词

Android / 校园助手 / 线程复用 / 通知模块

Key words

Android / campus assistant / thread reuse / notification module

引用本文

导出引用
李海平, 陈荣征, 李海文. 基于线程复用的Android校园 助手的通知模块设计[J]. 电脑与电信. 2016, 1(12): 19-20
Li Haiping, Chen Rongzheng, Li Haiwen. Notification Message Module Design for Android Campus Assistant Based on Thread Reuse[J]. Computer & Telecommunication. 2016, 1(12): 19-20
中图分类号: TP311.52   

基金

2015 年度广东大学生科技创新培育专项,2016 年度广东职业技术学院教学改革项目,项目编号:XJJG201608。

Accesses

Citation

Detail

段落导航
相关文章

/