PAHO MQTT Android Integration Issue

388 views Asked by At

I've been working on integrating the PAHO MQTT library into my Android app, and I'm facing an issue that I could use some help with.

I followed the code from this GitHub link: https://github.com/eclipse/paho.mqtt.android, but unfortunately, I encountered the following error:

java.lang.IllegalArgumentException: com.example.mqttrtu: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.

I tried the solution mentioned in this Stack Overflow answer: https://stackoverflow.com/a/71839305/5995648, but unfortunately, I'm still facing the same error.

If anyone has encountered a similar issue or knows how to resolve it, I would greatly appreciate your assistance. Additionally, if there are any alternatives to using PAHO MQTT with a proper Kotlin example, that would be incredibly helpful to me.

Does any one have example with this https://github.com/hannesa2/paho.mqtt.android

0

There are 0 answers