Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing pendingintent for A12 #471

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

tronku
Copy link

@tronku tronku commented Jan 19, 2022

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
Contributor

It's the same like #466

@tronku
Copy link
Author

tronku commented Jan 27, 2022

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

@hannesa2
Copy link
Contributor

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

@tronku
Copy link
Author

tronku commented Feb 2, 2022

@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

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

@tronku
Copy link
Author

tronku commented Feb 14, 2022

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

@shivamdhammi-winzo
Copy link

shivamdhammi-winzo commented May 5, 2022

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

@tronku
Copy link
Author

tronku commented May 5, 2022

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

@pricimus
Copy link

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

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.

None yet

6 participants