MQTT over websocket for Android and iOS

After a lot of research, I settled on the MQTT protocol for communication between devices. To take this even further, I thought it would be great to use MQTT over WebSockets. On the server side, I will be using Mosquitto which supports WebSockets. But for the client side, I'm not sure if there are any libraries for Android and iOS.

Any idea on how to implement it? or could there be any workaround?

+3


source to share


2 answers


If it is websockets, it will be Paho Javascript library .

If for some reason you want to make websites from native code rather than an embedded web page? I'm not sure if there are some native libraries for using MQTT over websockets, but I also can't think of a compelling reason to do this (maybe only for the port opened on the broker and even then some broker implementations share the port *).

Why would you want an MQTT user over Websockets from native code?



*) IBM Message Sight, for example.

EDIT:

Also if you want something that "feels" native but uses the Websocket library, you can look at something like Apache Cordova

0


source


If you are using iOS, I would recommend looking at the excellent MQTT-Client-Framework library. You can read about all the functions and how to use them here: http://www.hivemq.com/mqtt-client-library-encyclopedia-mqtt-client-framework/



0


source







All Articles