Android-Proximity-SDK icon indicating copy to clipboard operation
Android-Proximity-SDK copied to clipboard

Scanning crash with Android 31 and above

Open HossamYoussof opened this issue 1 year ago • 1 comments

Prerequisites

  • [X] Put an X between the brackets on this line if you have done all of the following:
    • My beacons have Estimote Monitoring enabled (Check it in the Estimote Cloud, or via app)
    • My Android device/devices supports BLE and has Android OS version >= 5.0.0
    • My Android device/devices have bluetooth enabled
    • My app has Location Permissions granted

Basic information

Estimote SDK version: [Core 1.3.4]

Android devices affected: [all devices]

Android OS version affected: [31 and above]

Beacon hardware version: [any version]

Description

Crash java.lang.IllegalArgumentException SystemAlarmManager.java:32 Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.

Stack trace

java.lang.IllegalArgumentException : Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
RUNNABLE
SystemAlarmManager.java:32
0 android.app.PendingIntent.checkFlags PendingIntent.java:382
1 android.app.PendingIntent.getBroadcastAsUser PendingIntent.java:673
2 android.app.PendingIntent.getBroadcast PendingIntent.java:660
3 com.estimote.coresdk.scanning.scheduling.SystemAlarmManager.setAlarm SystemAlarmManager.java:32
4 com.estimote.coresdk.scanning.scheduling.NougatScanScheduler.scheduleForegroundAlarm NougatScanScheduler.java:294
5 com.estimote.coresdk.scanning.scheduling.NougatScanScheduler.scheduleAlarm NougatScanScheduler.java:271
6 com.estimote.coresdk.scanning.scheduling.NougatScanScheduler.access$400 NougatScanScheduler.java:29
7 com.estimote.coresdk.scanning.scheduling.NougatScanScheduler$1.execute NougatScanScheduler.java:152
8 com.estimote.coresdk.scanning.scheduling.ScanCommandBuffer$2.run ScanCommandBuffer.java:54

Expected behavior: [Register beacon]

Actual behavior: [Crash]

HossamYoussof avatar Mar 03 '23 05:03 HossamYoussof

UP

I have same problem

joharputr avatar May 19 '23 07:05 joharputr