Skip to content

Fixing pendingintent for A12 - #471

Open
serializer wants to merge 1 commit into
eclipse-paho:masterfrom
serializer:a12_fix
Open

Fixing pendingintent for A12#471
serializer wants to merge 1 commit into
eclipse-paho:masterfrom
serializer:a12_fix

Conversation

@serializer

Copy link
Copy Markdown

Please make sure that the following boxes are checked before submitting your Pull Request, thank you!

  • You have signed the Eclipse ECA
  • All of your commits have been signed-off with the correct email address (The same one that you used to sign the CLA)
  • If This PR fixes an issue, that you reference the issue below. OR if this is a new issue that you are fixing straight away that you add some Description about the bug and how this will fix it.
  • If this is new functionality, You have added the appropriate Unit tests.

@hannesa2

Copy link
Copy Markdown
Contributor

It's the same like #466

@serializer

Copy link
Copy Markdown
Author

@hannesa2 still both are not merged or reviewed, this library is not being maintained properly in spite of high usage

@hannesa2

Copy link
Copy Markdown
Contributor

@tronku
Did you see there this #466 (comment) ?

@serializer

Copy link
Copy Markdown
Author

@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

@Benjamin410

Copy link
Copy Markdown

@tronku Could you explain me how I can use your fixed version instead of the official version? Thanks!!!

@serializer

Copy link
Copy Markdown
Author

@Benjamin410 i copied all the files of mqtt in my project and just changed the pending intent flags.

@shivamdhammi-winzo

shivamdhammi-winzo commented May 5, 2022

Copy link
Copy Markdown

@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)

@serializer

Copy link
Copy Markdown
Author

Yes @shivamdhammi-winzo
This permission is needed to be mentioned in the manifest for A12 devices

@pricimus

Copy link
Copy Markdown

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.

@LordBaryhobal

Copy link
Copy Markdown

Thanks for this easy fix, it works perfectly. I hope it can be merged soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants