Basic Steps for Using MQTT in android

You need:

  1. an MQTT broker which runs on the server side. This could be something like the mosquitto broker which is Open Source.
  2. an MQTT client library which you include in your Android app, enabling your app to connect, subscribe, and publish messages. There are a number of Java options listed at http://mqtt.org/software
  3. to come up with a way of uniquely identifying users or devices, and then use that as a topic so that you can individually publish a message to one device.

Dale Lane has written a nice guide on this (http://www.dalelane.co.uk/blog/?p=1599) and there is also a good set of resources about MQTT (https://github.com/mqtt/mqtt.github.io/wiki)

Leave a Comment