Android Programming Press on the image to return to the main documentation page.

jMQTT

List of types:

MqttClient
MqttConnectOptions

MqttClient


Permissions:

android.permission.INTERNET

Events:

Connected (Success As Boolean)
Disconnected
MessageArrived (Topic As String, Payload() As Byte)

Members:


  ClientId As String [read only]

  Close

  Connect

  Connect2 (Options As org.eclipse.paho.client.mqttv3.MqttConnectOptions)

  Connected As Boolean [read only]

  Initialize (EventName As String, ServerURI As String, ClientId As String)

  IsInitialized As Boolean

  Publish (Topic As String, Payload() As Byte)

  Publish2 (Topic As String, Payload() As Byte, QOS As Int, Retained As Boolean)

  QOS_0_MOST_ONCE As Int

  QOS_1_LEAST_ONCE As Int

  QOS_2_EXACTLY_ONCE As Int

  Subscribe (Topic As String, QOS As Int)

  Unsubscribe (Topic As String)

Members description:

ClientId As String [read only]
Close
Connect
Connect2 (Options As org.eclipse.paho.client.mqttv3.MqttConnectOptions)
Connected As Boolean [read only]
Initialize (EventName As String, ServerURI As String, ClientId As String)
IsInitialized As Boolean
Publish (Topic As String, Payload() As Byte)
Publish2 (Topic As String, Payload() As Byte, QOS As Int, Retained As Boolean)
QOS_0_MOST_ONCE As Int
QOS_1_LEAST_ONCE As Int
QOS_2_EXACTLY_ONCE As Int
Subscribe (Topic As String, QOS As Int)
Unsubscribe (Topic As String)

MqttConnectOptions


Events:

None

Members:


  CleanSession As Boolean

  Initialize (UserName As String, Password As String)

  IsInitialized As Boolean

  Password As String

  SetLastWill (Topic As String, Payload() As Byte, QOS As Int, Retained As Boolean)

  UserName As String

Members description:

CleanSession As Boolean
If set to true (default value) then the state will not be preserved in the case of client restarts.
Initialize (UserName As String, Password As String)
Initializes the object and sets the username and password.
Pass empty strings if username or password are not required.
IsInitialized As Boolean
Password As String
Gets or sets the connection password.
SetLastWill (Topic As String, Payload() As Byte, QOS As Int, Retained As Boolean)
UserName As String
Gets or sets the connection user name.
Top