1.服务器安装:IBM的 RSMB (MQTT协议代理)

Really Small Message Broke(rsmb_1.2.0)
http://download.csdn.net/detail/wuzehai02/4735055

安装

To start the broker on Windows:

  1. In the folder where you installed the broker, double-clickbroker.exe.

To start the broker on Linux:

  1. In a terminal, change to the directory where you installed the broker; for example:
    cd /home/laura/broker
  2. Enter the appropriate command for your platform. For example, on Ubuntu, type:
    ./broker.ubuntu
    Alternatively, to run the broker in the background so that it will continue to run when you log out of the session, enter the following command:
    nohup ./broker.ubuntu >> /dev/null &

The broker is now ready to publish messages.

To stop the broker cleanly, type Ctrl-C. On Linux, if you prefer, you can just kill the process of the running broker:

ps -ef | grep brokerkill -term process_id_of_the_running_broker


2服务器消息发送方:
PHP服务器端使用的是:SAM 针对MQTT写的PHP库 (下载链接为Tokudu PHPMQTT通信项目),其中send_mqtt.php是一个通过POST接收消息并且通过SAM将消息发送给RSMB的PHP脚本。
下载地址
http://download.csdn.net/detail/wuzehai02/4735078



3 ANDROID 客户端的消息PUSH DEMO

下载地址
http://download.csdn.net/detail/wuzehai02/4735172





经过本人测试过,代码绝对可用

更多相关文章

  1. Android开发环境搭建
  2. Android(安卓)配置环境
  3. Android5.0挂载子系统
  4. android上传图片至服务器
  5. Android开机自启动
  6. 浅析Android中的消息机制
  7. 新建项目出现android support library问题解决
  8. 浅析Android中的消息机制
  9. android 实现类似Iphone底部消息数量提示

随机推荐

  1. android root实践
  2. Android之RecycleView实现指定范围的拖动
  3. 利用 Python 进行多 Sheet 表合并、多工
  4. Android知识点总结(十五) Android(安卓)MVP
  5. android BLE 4.0 setCharacteristicNotif
  6. Android系统横竖屏切换时候Activity的生
  7. Android(安卓)自定义ContentProvider和Co
  8. Android(安卓)GPS学习笔记—LMS初始化
  9. Android(安卓)代码中对不同国家支持的信
  10. android之Handler的使用,回到主线程更新UI