paho.mqtt.android icon indicating copy to clipboard operation
paho.mqtt.android copied to clipboard

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

Open Swordce opened this issue 3 years ago • 1 comments

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)

Swordce avatar Jan 27 '22 10:01 Swordce

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

bingerz avatar Apr 27 '22 10:04 bingerz