Open javitolin opened 1 year ago
any solution to this problem ?
I have the same problem, any suggestions?
Didn't get any answers and didn't get the time to try and fix it myself..
Hi ! Same problem for me any solution ?
Hello,
For now update the file in "node_modules/react-native-get-sms-android/android/src/main/java/com/react/SMSModule.java" with these lines of code PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT
The lines of code would look like this:
PendingIntent sentPI = PendingIntent.getBroadcast(context, 0, new Intent(SENT), PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT); PendingIntent deliveredPI = PendingIntent.getBroadcast(context, 0, new Intent(DELIVERED), PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT);
I found this in some forums for the moment it should work, although I understand that it is not a good practice to modify these node_modules files.
@franzamd Correct PendingIntent.FLAG_IMMUTABLE can we add id for autosend and call back?
Hello,
For now update the file in "node_modules/react-native-get-sms-android/android/src/main/java/com/react/SMSModule.java" with these lines of code
PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT
The lines of code would look like this:
PendingIntent sentPI = PendingIntent.getBroadcast(context, 0, new Intent(SENT), PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT); PendingIntent deliveredPI = PendingIntent.getBroadcast(context, 0, new Intent(DELIVERED), PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT);
I found this in some forums for the moment it should work, although I understand that it is not a good practice to modify these node_modules files.
thanks this soluction solved the issues for me
Hi! I'm getting this error when trying to send a SMS:
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.
Any ideas? Thanks!