eclipse / paho.mqtt.android

MQTT Android
Other
2.88k stars 862 forks source link

MQTT Exception not supported on Android 12 #482

Open AshutoshGrab1990 opened 1 year ago

AshutoshGrab1990 commented 1 year ago

FATAL EXCEPTION: MQTT Rec: com.grab.grabrider:G102795:a1befa45613a437bd71cc08cfc57a4d2c26 Process: com.grab.grabrider, PID: 13370 java.lang.IllegalArgumentException: com.grab.grabrider: 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. at android.app.PendingIntent.checkFlags(PendingIntent.java:375) at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645) at android.app.PendingIntent.getBroadcast(PendingIntent.java:632) at org.eclipse.paho.android.service.AlarmPingSender.start(AlarmPingSender.java:76) at org.eclipse.paho.client.mqttv3.internal.ClientState.connected(ClientState.java:1214) at org.eclipse.paho.client.mqttv3.internal.ClientState.notifyReceivedAck(ClientState.java:1050) at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:151) at java.lang.Thread.run(Thread.java:920)

Working On Android 12 and MQTT is not supported on Android 12

tabilzad commented 1 year ago

duplicate of 480

AshutoshGrab1990 commented 1 year ago

Hi @tabilzad we only want to use authorised library only because it is a critical to business and also security concern. Also I would like to tell you that I tried to use this https://github.com/hannesa2/paho.mqtt.android but it gives error at Mqtt service and alarl manager. Please suggest alternative @jponge @ketan @atoulme

tabilzad commented 1 year ago

@AshutoshGrab1990 this repo hasnt been updated in several years so its unlikely this official lib will support Android 12 anytime soon. In regards to issues related @hannesa2's repo - please post there.

AshutoshGrab1990 commented 1 year ago

@tabilzad Can you please suggest any alternative like paid operations.

tabilzad commented 1 year ago

@tabilzad Can you please suggest any alternative like paid operations.

https://github.com/aws/aws-iot-device-sdk-java-v2

0x3fffff commented 1 year ago

add implementation 'com.google.android.gms:play-services-nearby:18.0.0'