flutter_mapbox_navigation
flutter_mapbox_navigation copied to clipboard
exception on android 12+ Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. fixed
hi tnx a lot for your package i think i have solved this exception thrown on android 12 devices
additionally there is this kotlin code snippet but i dont have kotling knowledge necessary for implementing it but adding workmanager dependency and enabling activity export solved the problem for me.
val updatedPendingIntent = PendingIntent.getActivity(
applicationContext,
NOTIFICATION_REQUEST_CODE,
updatedIntent,
PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT // setting the mutability flag
)
for mutable flag
val updatedPendingIntent = PendingIntent.getActivity(
applicationContext,
NOTIFICATION_REQUEST_CODE,
updatedIntent,
PendingIntent.FLAG_MUTABLE or PendingIntent.FLAG_UPDATE_CURRENT // setting the mutability flag
)