the current version of the Paho Java should
work on Android with the caveats re location of where messages are stored.
I have not come across the problem you mention where the client is
disconnected when a message arrives. Does the error occur before
message arrived is called, during or after control is returned from it?
There are some updates in progress to
both fix a number of problems and add some enhancements to make it more
friendly to Android. The update will also have been through a rigorous
test on Android. Hoping to have this available in Dec.
All the best
Sergio Torassa <sergio.torassa@xxxxxxxxxxx>
when receiving messages
I'm trying to use the mqtt paho library in an Android application for usage
with a mosquitto server.
I eventually was able to solve all the issues wrt write permissions on
Android directories, uses-permissions in the manifest and so on, but now
each time the device receives a message, the client is disconnected with
a message on the mosquitto server like this
Socket read error on client 0001, disconnecting.
Then the client has to reconnect and possibly to re-subscribe to all its
My workaround is to re-connect and re-subscribe in the MqttCallback.ConnectionLost,
but it is of course only a workaround.
Has anybody found a similar issue in implementing paho library?
If needed I can provide my code, but it is a very basic implementation
of the paho client.