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

java.lang.SecurityException: Permission Denial: getIntentForIntentSender() #472

Open
3 tasks
Swordce opened this issue Jan 27, 2022 · 1 comment
Open
3 tasks

Comments

@Swordce
Copy link

Swordce commented Jan 27, 2022

Please fill out the form below before submitting, thank you!

  • Bug exists Release Version 1.1.1 (Java Repository Master Branch)
  • Bug exists in Snapshot Version 1.1.2-SNAPSHOT (Android Service Repository Master Branch)
  • Bug is just in the Sample Application.

__Android API Version Bug Seen on: API 30

__Android Version Bug Seen on: Android 7

Please also check that if you have found the bug in the Release version (1.1.1) that you check that it also exists in the Snapshot (1.1.2-SNAPSHOT) before raising a bug.

Console Log output (if available):

Process: cn.wtbiz.suqian.ctuav, PID: 7904
java.lang.SecurityException: Permission Denial: getIntentForIntentSender() from pid=7904, uid=10060 requires android.permission.GET_INTENT_SENDER_INTENT
at android.os.Parcel.readException(Parcel.java:1684)
at android.os.Parcel.readException(Parcel.java:1637)
at android.app.IAlarmManager$Stub$Proxy.set(IAlarmManager.java:245)
at android.app.AlarmManager.setImpl(AlarmManager.java:668)
at android.app.AlarmManager.setExactAndAllowWhileIdle(AlarmManager.java:874)
at org.eclipse.paho.android.service.AlarmPingSender.schedule(AlarmPingSender.java:115)
at org.eclipse.paho.android.service.AlarmPingSender.start(AlarmPingSender.java:79)
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:761)

@bingerz
Copy link

bingerz commented Apr 27, 2022

My app was forced to upgrade to Target 31. I encountered this problem and couldn't wait for the new version. I just forked and repackaged the version myself.
implementation 'cn.bingerz.android:org.eclipse.paho.android.service:1.1.2-SNAPSHOT'

Update content:
Support AndroidX.
Upgrade Gradle to 7.x.
Fix PendingIntent flag FLAG_IMMUTABLE issue.
Avoid Permission Denial: getIntentForIntentSender() issue.

For specific modifications, please see: https://github.com/bingerz/flip-mqtt-android

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

No branches or pull requests

2 participants