android 推送协议,Android 平台基于 MQTT 协议的推送机制①.PDF

2015 年 第 24 卷 第 1 期 计 算 机 系 统 应 用

Android 平台基于MQTT 协议的推送机制

许金喜, 张新有

(西南交通大学 信息科学与技术学院, 成都 610031)

摘 要: Android 平台的迅速崛起对消息推送技术提出了更严峻的挑战. 传统的推送通知方式主要有 Polling, SMS

Push, IP Push 三种, 但对 Android 平台上的应用来说, 这些推送方式都有各自的短板. 针对该情况, 首先对

Android 平台上几种推送机制进行了分析, 之后着重对基于MQTT 协议的推送机制进行研究, 最后借助 IBM 提供

的开源工具Mosquitto 通过编码加以实现. 经实验测试, 证明基于MQTT 协议的推送机制效率高, 功耗低, 可以稳

定地用于 Android 平台上的应用.

关键词: Android; 推送; MQTT 协议; QoS; Mosquitto

Push Mechanism on Android Platform Based on MQTT Protocol

XU Jin-Xi, ZHANG Xin-You

(School of Information Science & Technology, Southwest Jiaotong University, Chengdu 610031, China)

Abstract: The rapid development of Android platform brings forward more severe challenge for message push

technology. Traditional ways of push notification mainly contain Polling, SMS Push and IP Push . But for applications

on Android platform, any of these push technology has its own shortcomings. Firstly, an analysis was conducted on

various kinds of push mechanism on Android Platform. Then a push mechanism based on protocol MQTT was

researched in detail. Finally it was implemented through coding with the help of open source tool Mosquitto supported

by IBM. Experimental results showed that this way has a low power consumption and high efficiency and it could be

used for applications steadily on Android platform.

Key words: Android; push; MQTT protocol; QoS; Mosquitto

1 引言 QoS 保证机制. 最后通过设计推送系统, 验证了

支持多种应用是 Android 平台的精髓所在. 这些 MQTT 推送方式的优良性能.

应用作为客户端, 要收到来自服务器的消息和通知有

两种方式, 一种是 pull(拉), 即客户端主动连接服务器 2 Android平台推送机制分析

获取信息. 另一种是 push(推), 即由服务器主动将信 Push(推送)技术又称

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值