Open tronku opened 2 years ago
It's the same like https://github.com/eclipse/paho.mqtt.android/pull/466
@hannesa2 still both are not merged or reviewed, this library is not being maintained properly in spite of high usage
@tronku Did you see there this https://github.com/eclipse/paho.mqtt.android/pull/466#issuecomment-1019429898 ?
@hannesa2 will have to check your implementation, can't directly switch from eclipse paho although I solved the issue for myself by reusing the entire code with the minor flag change
@tronku Could you explain me how I can use your fixed version instead of the official version? Thanks!!!
@Benjamin410 i copied all the files of mqtt in my project and just changed the pending intent flags.
@tronku @hannesa2 changing these flags is giving me the error mentioned below:
Fatal Exception: java.lang.SecurityException: Caller needs to hold android.permission.SCHEDULE_EXACT_ALARM to set exact alarms. at android.os.Parcel.createExceptionOrNull(Parcel.java:2437) at android.os.Parcel.createException(Parcel.java:2421) at android.os.Parcel.readException(Parcel.java:2404) at android.os.Parcel.readException(Parcel.java:2346) at android.app.IAlarmManager$Stub$Proxy.set(IAlarmManager.java:395) at android.app.AlarmManager.setImpl(AlarmManager.java:976) at android.app.AlarmManager.setImpl(AlarmManager.java:936) at android.app.AlarmManager.setExactAndAllowWhileIdle(AlarmManager.java:1204) at info.mqtt.android.service.ping.AlarmPingSender.schedule(AlarmPingSender.kt:86) at info.mqtt.android.service.ping.AlarmPingSender.start(AlarmPingSender.kt:57) 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)
Yes @shivamdhammi-winzo This permission is needed to be mentioned in the manifest for A12 devices
Is this branch going to get merged? It's passed all checks and without it, it's holding up the ability to upgrade target sdk versions.
Thanks for this easy fix, it works perfectly. I hope it can be merged soon
Please make sure that the following boxes are checked before submitting your Pull Request, thank you!