An Android weather application implemented using the MVVM pattern, Retrofit2, Dagger Hilt, LiveData, ViewModel, Coroutines, Room, Navigation Components, Data Binding and some other libraries from the Android Jetpack.
MIT License
767
stars
165
forks
source link
Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE #54
if you are on S+ android api you may get this error so in notification helper you can update pending intent to check if current sdk is higher than S api
val pendingIntent: PendingIntent = PendingIntent.getActivity(
context,
0,
intent,
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
FLAG_IMMUTABLE
} else {
0
}
)
if you are on S+ android api you may get this error so in notification helper you can update pending intent to check if current sdk is higher than S api
val pendingIntent: PendingIntent = PendingIntent.getActivity( context, 0, intent, if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { FLAG_IMMUTABLE } else { 0 } )