Paho Mqtt Android package for sdk version 31 or above.
paho.mqtt.android package from eclipse currently has issue at sdk version upper than 31.
This is because, PendingIntent class from Android has been changed according to:
https://developer.android.com/about/versions/12/behavior-changes-12#pending-intent-mutability
The error is still opened as: eclipse#485, so if you want to retrieve any .jar from the package, refer followings.
- Reference is here: eclipse#485 (comment)
- I've modified more build configurations to build package rather than copying whole codes.
- windows:
.\gradlew.bat clean org.eclipse.paho.android.service:assemble org.eclipse.paho.android.service:publish
- Location:
~/paho.mqtt.android/org.eclipse.paho.android.service/build/libs/
- File:
org.eclipse.paho.android.service-1.1.1.jar
(.aar outputs are under~/paho.mqtt.android/org.eclipse.paho.android.service/build/outputs/aar
)
dependencies {
...
implementation files('lib/org.eclipse.paho.client.mqttv3-1.2.5.jar')
implementation files('lib/org.eclipse.paho.android.service-1.1.1.jar')
...
}