Android implementation based on MQTT protocol and Android Implementation of MQTT Protocol

Source: Internet
Author: User

Android implementation based on MQTT protocol and Android Implementation of MQTT Protocol

I recently used message push in a project. After searching for it online for a while, I found two IBM MQTT libraries: wmqtt. jar and mqttv3.jar. This document describes how to use the mqttva. jar library.


The first choice is to build the ActiveMQ server. You can search Baidu or other engines for the installation and operation of the ActiveMQ server. The introduction is complete.

1. Use adt to build the following project

 

The above is my project. Of course, some of the Code also comes from the network. Now I will return it back to the network. Haha ~~~

2. Android Interface Design


You can design the above interface. How can this problem be easily done by everyone.


Iii. Postscript

After the project code is compiled, it runs on a mobile phone or a die-like device. Enter the address, port, and topic to subscribe to and publish MQTT messages.


Final attachment code: http://download.csdn.net/detail/liuping36131997/8147273

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.