Library Reference

Factory Constructor

public AbtooConnection AbtooDroidConnection.getService                                      (Activity activity, String QueueName,
int HeartBeat, int Resource, String Title, String Description)

This is the only way to declare a new abetoo connection. As a singleton. You need to pass the following parameters.

  • Activity, a reference to the current activity.
  • QueueName, local channel id.
  • HeartBeat, Timeout. Used to check the health of a connection.
  • Resource, an icon reference for the notification bar.
  • Title, a main title for the foreground notificacion bar.
  • Description, a brief description of the application.


public void connect()

Used to establish a connection with the remote server, normally called just after the creation of a new abetoo object. Once the connection is triggered, the abetoo object takes care about connection lost management and reconnections.

No parameters.

public void disconnect()

Disconnect the current connection from the remote server.

No parameters.

public bool isConnected()

Return the status of the connection either connected (true) or disconnected (false)

No parameters.

public bool sendMessage(String DestinationId, String Body, String Correlationid)

Used to send messages to a remote device using it’s channel id

  • DestinationId, channel id of the remote device you want to send a message.
  • Body, message as a XML/JSON or as a plain text.
  • Correlationid, used to keep track about the messages sent/received. If you want to use a challenge/response approach you can associate the challenge sent message with a correlation id, once a message is received you can use its correlation id to identify the associated challenge message.


 EventHandler<AbtooMessage> messageReceived

Triggered whenever a new message is received.

Was this article helpful?

Related Articles

Leave A Comment?