This is an SMS library for Flutter. Its allow to send, receive, query sms messages, sms delivery and query contacts info. Currently supporting only android
MIT License
31
stars
69
forks
source link
Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified #17
Hi,
The package works perfectly on Android versions before API 31, while mentioned exception is thrown for Android devices with API 31+, I managed to workaround the exception by changing the PendingIntent from FLAG_UPDATE_CURRENT To FLAG_MUTABLE
The exception with SmsSender
Before
val deliveredPendingIntent = PendingIntent.getBroadcast(
context,
UUID.randomUUID().hashCode(),
deliveredIntent,
PendingIntent.FLAG_UPDATE_CURRENT
After
val deliveredPendingIntent = PendingIntent.getBroadcast(
context,
UUID.randomUUID().hashCode(),
deliveredIntent,
PendingIntent.FLAG_IMMUTABLE
Hi, The package works perfectly on Android versions before API 31, while mentioned exception is thrown for Android devices with API 31+, I managed to workaround the exception by changing the PendingIntent from FLAG_UPDATE_CURRENT To FLAG_MUTABLE The exception with SmsSender Before val deliveredPendingIntent = PendingIntent.getBroadcast( context, UUID.randomUUID().hashCode(), deliveredIntent, PendingIntent.FLAG_UPDATE_CURRENT
After val deliveredPendingIntent = PendingIntent.getBroadcast( context, UUID.randomUUID().hashCode(), deliveredIntent, PendingIntent.FLAG_IMMUTABLE
Best Regards