摘要
针对Android平台的智能终端在获取推送消息时存在的与服务器端数据同步、费电、耗流量和推送成本高等问题,通过对传统Pull和Push方式的简单轮询、短信服务、持久连接和长轮询等四种技术的分析和对Android平台目前采用的C2DM、MQTT、XMPP等方案的研究,发现了具体实现时可能出现的向下兼容性不好、硬件成本高和性能不稳定等不足。探讨了一种基于AlarmManager机制在移动终端与服务器之间维持TCP长连接来实现实时推送的方案。最后结合国内采用该方案的极光推送JPush平台设计了一个由服务器端和Android客户端组成的校园快讯系统。
When the terminal for Android Gets Push messages and has data synchronization with the server,it leads to high costs of electricity,consumption flow and high cost of push.To resolve these problems,this paper analyzes four kinds of technology of the traditional Pull and Push,i.e.,in the way of simple polling,SMS services,persistent connections and long polling.,and Rresearch on Android platform currently used in the scheme of C2DM,MQTT,and XMPP.It is fFound that at the concrete implementation down has bad compatibility and high cost of hardware,and performance is not stable,etc.The paper Ddiscusses a scheme of real-time message push for by using AlarmManager mechanism to maintain TCP long connection between the terminal and the server maintenance TCP long connection.Finally,combining JPush platform to design a alert system of campus is designed to composed theof Sserver and the Android Clientclients.
出处
《实验室研究与探索》
CAS
北大核心
2014年第5期96-100,共5页
Research and Exploration In Laboratory
基金
Google中国大学合作部2012年Android创新(开发)重点资助项目(SOW12-11/64005799)