MQTT – MQ Telemetry Transport for B4A

MQTT - MQ Telemetry Transport for B4A

MQTT – MQ Telemetry Transport for B4A

Author
Alberto Iglesias
Release
2019-09-12
Version
2.0.0
Requirement
B4A

£8.99

MQTT – MQ Telemetry Transport for B4A

SKU: B4ALIBMQTT Category: Tag:

Product Description

MQTT – MQ Telemetry Transport for B4A

 

This library was made based on MQTT Protocol

Installation instructions:
– Copy the .xml and .jar(s) files to your custom libraries folder
– Select in your REFERENCED LIBRARIES

Events:

  • connectionlost ( )
  • deliverycomplete (Token As String)
  • messageArrived (Topic As String, Message As String)
  • onConnect (Status as boolean)
  • onDisconnect (Status as boolean)
  • onInitialized ( )

Fields:

  • CleanSession As Boolean
  • JavaDebug As Boolean
  • KeepAliveInterval As Int
  • QoS_AtLeastOnce As Int
  • QoS_AtMostOnce As Int
  • QoS_ExactlyOnce As Int
  • generatedClientId As String

Methods:

  • About As String
  • Connect (broker As String, ClientID As String, Username As String, Password As String) As Boolean
  • Disconnect As Boolean
  • Initialize (eventname As String)
  • Publish (Topic As String, Message As String, Qos As Int, Retained As Boolean)
  • Publish2 (Topic As String, Message As String, Qos As Int, Retained As Boolean)
  • Subscribe (Topic As String)
  • Subscribe2 (Topic As String, QoS as int)
  • Subscribe3 (Topic As String)
  • Subscribe4 (Topic As String, QoS as int)
  • Unsubscribe (Topic As String)
  • Version As String
  • isConnected As Boolean

Permissions:

  • android.permission.ACCESS_WIFI_STATE
  • android.permission.INTERNET

MqttSample1

MqttSample2

How works the MQTT protocol

MqttScheme1

Communication Infrastructure

MqttScheme2

References:
http://mqtt.org/
http://public.dhe.ibm.com/software/dw/webservices/ws-mqtt/mqtt-v3r1.html
Mosquitto Broker: http://mosquitto.org/

 

Library

 

Sample 1
Sample 2
Sample 3
Sample 4

 

BEFORE PAY ANY LIBRAY, YOU CAN TEST THE LIBRARY TO MAKE SURE WILL BE WORK FOR YOUR PROJECT