Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Paho MQTT for Android NDK

Hi Fernando,

I haven't personally used the C client within Android - this capability was in a contribution:

Perhaps you could try asking the author of the PR?


On 23/11/2017 18:38, Fernando . wrote:
Hello all,

After searching the internet a bit a found there is an Android version of Paho MQTT, but it's in Java and i was interested in using the C implementation with Android's NDK.
I already have an ongoing C project in Android Studio and wanted to integrate it with the Paho Mqtt C client.

I noticed there is an "android" folder at github but i'm not sure if i'm able to use that makefile with Android Studio:

This is fairly new to me, so i'm unsure if there are special steps needed to do this.
Initially my idea was to add the "add_library" command to the default/main "CMakeList.txt" with all the source files to be compiled as a shared object (including the headers also), but i got a "multiple definitions" error in "MQTTClient.c":
Error:(1314) multiple definition of `MQTTProtocol_closeSession'
Error:(84) multiple definition of `bstate'
Error:(80) multiple definition of `client_timestamp_eye'
Error:(80) multiple definition of `client_version_eye'

paho-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Ian Craggs
icraggs@xxxxxxxxxx                 IBM United Kingdom
Paho Project Lead; Committer on Mosquitto

Back to the top