MQTT broker for Android

mqtt broker android github
android mqtt broker example
free mqtt broker
android studio mqtt client tutorial
android mqtt widget
android mqtt background service
mqtt broker windows
mqtt dashboard

Does anyone know of an MQTT broker that runs on an Android smartphone? I tried to Google and found nothing, and on the app store there seems to be only one app with just 10 downloads, so I'm not sure how well it works.

Add these dependencies to the gradle

   compile 'io.moquette:moquette-netty-parser:0.8.1'
    compile 'io.moquette:moquette-broker:0.8.1'
    compile 'io.moquette:moquette-parser-commons:0.8.1'

And use

io.moquette.server.Server server = new io.moquette.server.Server();

to start broker server. the default URI is tcp://localhost:1883

For me server.startServer(); gave me exception as it is unable to create a file BrokerConstants.DEFAULT_MOQUETTE_STORE_MAP_DB_FILENAME. So, I changed the destination of the BrokerConstants.DEFAULT_MOQUETTE_STORE_MAP_DB_FILENAME using this code below code and it worked for me.

     try {
         MemoryConfig memoryConfig = new MemoryConfig(new Properties());
memoryConfig.setProperty(BrokerConstants.PERSISTENT_STORE_PROPERTY_NAME, Environment.getExternalStorageDirectory().getAbsolutePath()+ File.separator + BrokerConstants.DEFAULT_MOQUETTE_STORE_MAP_DB_FILENAME);
        // server.startServer();//is not working due to DEFAULT_MOQUETTE_STORE_MAP_DB_FILENAME; 
        Log.d(TAG,"Server Started");
         catch (IOException e) { e.printStackTrace(); }
         catch (Exception e){ e.printStackTrace(); }

And Use Paho libraries for android

compile 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.1.0'
compile ''

To create a client and connect to tcp://localhost:1883 and subscribe for a topic and start publishing and receiving messages.

moquette library for android.

Mqtt Broker App, Add these dependencies to the gradle dependencies{ compile 'io.moquette: moquette-netty-parser:0.8.1' compile� This App creates Mqtt Broker on your Android phone and display the Full URL and port of the Mqtt Broker Server. For IOT Applications, you dont need a different server rather than just your phone

I have developed an App specifically for this , please download here -

It has inbuilt broker and client too..all for free , connect your devices to android phone via hotspot or wifi.

MQTT broker for Android, I demonstrate in this video how to install and run Mosquitto MQTT broker on an Android phone Duration: 4:20 Posted: Jun 9, 2018 Using Android-Tablet as an MQTT-Server. TLDR; Possible, have a look for a pure Java broker like HiveMQ.

Here is an MQTT broker library I have adapted to Android: You'll have to make your own Android app though, it is just a library.

Install and run MQTT broker on Android device, HiveMQ CE is a Java-based open source MQTT broker that fully supports MQTT 3.x and MQTT 5. [IoT] Broker for NodeMCU on Android - university project. Finally an MQTT broker for Android! This is a fork of the Moquette project for Android. There are a lot of files left which are not needed. The major parts in the modification is to use Gradle build system and to change logging to standard Android logging.

Have a look at this question:

Using Android-Tablet as an MQTT-Server


Possible, have a look for a pure Java broker like HiveMQ.

MQTT on Android, The last step of this wide IoT project is installing the MQTT server. As you already know, this is the link between the publisher and the subscriber. Download Mqtt Buddy APK for Android phones here, No ads! Fast download Mqtt Buddy and install the latest version on All apps & games are free on 9Apps.

mqtt-broker � GitHub Topics � GitHub, This story will make you aware of what is MQTT and how to implement Paho MQTT in Android Application with Mosquitto broker . The Android Application Then we need to make the android application to get the data from the MQTT broker. First make a new project in Android Studio. if you are not aware of that, follow steps in

Installing the MQTT server, The MQTT broker (or server) is in charge of managing of sending message to a specific (or specifics) topics and all clients subscribed to it will be� MQTT Broker on Android Phone - Stack Overflow. I installed Mosquitto broker on my Android phone using this link basically using TermuxThe problem is this only suppo Stack Overflow. Products. Customers.

how to work with mqtt in android, step by step process, Different tools for Desktop, Android or iOS. client tool that enables you to interact quickly and easily with any MQTT Broker in various ways. On this article, I will try to show you a little implementation of the MQTT protocol in Android based in my experience. MQTT Basics. As I previously mention, MQTT is a publish-subscribe-based messaging protocol, this means that clients must subscribe to a specific topic where messages are sent. The MQTT broker (or server) is in charge of managing of sending message to a specific (or specifics) topics and all clients subscribed to it will be receiving the data.

About the MQTT protocol for IoT on Android, MQTT Broker The publish-subscribe messaging pattern requires a message broker. The broker is responsible for distributing messages to interested clients based on the topic of a message.It also holds the session of all persisted clients including subscriptions and missed messages.

  • Why would you like to run a MQTT broker on Android?
  • I'm working on a project that may require that multiple clients on the phone talk to each other using MQTT. The same type of clients talk to each other from one device to another using an external MQTT broker, so from the reuse point of view and the requirement that they talk via MQTT, I (think I) really need an MQTT broker.
  • I have tried this,but this keeps on crashing my app without showing any errors.could you help me with this?
  • Now it does not crash the app but instead cannot connect to the server.How do i start the server at tcp://localhost:1883?
  • use io.moquette.server.Server server = new io.moquette.server.Server(); server.startServer(); to start service run this code in service or a thread.
  • @DhruvMarwha access it here -
  • @anshulkatta Thank You.I'll check it out surely.When did you make this app?
  • why is this answer downvoted? Because he did the app himself? IMHO this answers the original question perfectly.. And I'm giving a try to this app right now
  • Can you share the code in github and make it open source it will be very useful. Thank you.
  • +1 on open sourcing the code. This is really a cool app. Thanks for building it. If there is no internet, then the IP address is I think this makes sense but if I have other devices connected to a phone over the hotspot, then I would want the IP address to be where is the default IP address for the hotspot. This IP address may have been changed by mobile phone manufacturer sometimes.
  • can you help in making a sample app using moquette for Android ?
  • HiveMQ is not supported in Android. --- Production: Linux is the only supported operating system for production environments. CentOS7 or other RHEL-based distributions are recommended.