Android Service

The Paho Android Service is an interface to the Paho Java MQTT client library that provides a long running service for handling sending and receiving messages on behalf of Android client applications when the applications main Activity may not be running.

The Paho Android Service provides an asynchronous API.


Building from source

The Paho Android Service is contained within the Paho Java client repository which can be cloned from git with the following command

git clone

The source code for the Paho Android Service can be found in the directory relative to the directory the git repository was cloned into in the previous step.

There are two other directories in, which contains the source code to a sample application, and which contains tests for the Android Service.

All three directories are also setup as eclipse projects that can be imported into an eclipse instance that has the Android Development Tools installed.

When building the Paho Android Service from source you should ensure that an appropriate version of the Paho Java client library jar file has been copied into


The Paho Android Service jar can be downloaded from the nexus repository.

When developing Android applications you will require both the Paho Android Service jar and the Paho Java Client library jar.


Reference documentation is online at:

Getting Started

A sample application in source code form is included in the directory. Click here to read the details of the getting started section.