Skip to main content

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

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'

Back to the top