mrmans0n / smart-location-lib

Android library project that lets you manage the location updates to be as painless as possible
1.65k stars 352 forks source link

java.lang.IllegalArgumentException:: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. #283

Open khoshbin opened 2 years ago

khoshbin commented 2 years ago

Hi , there is problem in newer android versions

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. -- 2 at android.app.PendingIntent.checkFlags(PendingIntent.java:382) 3 at android.app.PendingIntent.buildServicePendingIntent(PendingIntent.java:752) 4 at android.app.PendingIntent.getService(PendingIntent.java:714) 5 at io.nlopez.smartlocation.geofencing.providers.GeofencingGooglePlayServicesProvider.init(GeofencingGooglePlayServicesProvider.java:86) 6 at io.nlopez.smartlocation.SmartLocation$GeofencingControl.<init>(SmartLocation.java:377) 7 at io.nlopez.smartlocation.SmartLocation.geofencing(SmartLocation.java:108) 8 at io.nlopez.smartlocation.SmartLocation.geofencing(SmartLocation.java:100)
Usama7666 commented 2 years ago

facing same issue

owaisalam12 commented 1 year ago

@khoshbin @Usama7666 Did you find any solution?

WalidFekry commented 1 year ago

facing same issue :"(

usergoodvery commented 1 year ago

Just replace every instance of PendingIntent.FLAG_UPDATE_CURRENT with PendingIntent.FLAG_MUTABLE|PendingIntent.FLAG_UPDATE_CURRENT

christocracy commented 1 year ago

This plugin has supported this flag for over a year.

Any reported references to this issue are due either to your own AndroidManifest or some other plugin.

this plugin is complied with SDK 33.