You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Device: generic_x86_64 (Android Studio x86 emulator)
OS: Android 12
App Version: 4.0.0
π Additional context
Crash Log
--------- beginning of crash
03-07 10:29:21.888 4775 4775 E AndroidRuntime: FATAL EXCEPTION: main
03-07 10:29:21.888 4775 4775 E AndroidRuntime: Process: rocks.poopjournal.todont, PID: 4775
03-07 10:29:21.888 4775 4775 E AndroidRuntime: java.lang.IllegalArgumentException: rocks.poopjournal.todont: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
03-07 10:29:21.888 4775 4775 E AndroidRuntime: 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.
03-07 10:29:21.888 4775 4775 E AndroidRuntime: at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
03-07 10:29:21.888 4775 4775 E AndroidRuntime: at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645)
03-07 10:29:21.888 4775 4775 E AndroidRuntime: at android.app.PendingIntent.getBroadcast(PendingIntent.java:632)
03-07 10:29:21.888 4775 4775 E AndroidRuntime: at rocks.poopjournal.todont.utils.HabitsBottomSheetDialog.deleteAlarm(HabitsBottomSheetDialog.kt:284)
03-07 10:29:21.888 4775 4775 E AndroidRuntime: at rocks.poopjournal.todont.utils.HabitsBottomSheetDialog._init_$lambda$7(HabitsBottomSheetDialog.kt:142)
03-07 10:29:21.888 4775 4775 E AndroidRuntime: at rocks.poopjournal.todont.utils.HabitsBottomSheetDialog.$r8$lambda$NtGMwMfakvBKiGJqSn24wOOJK3E(Unknown Source:0)
03-07 10:29:21.888 4775 4775 E AndroidRuntime: at rocks.poopjournal.todont.utils.HabitsBottomSheetDialog$$ExternalSyntheticLambda5.onClick(D8$$SyntheticClass:0)
03-07 10:29:21.888 4775 4775 E AndroidRuntime: at android.view.View.performClick(View.java:7441)
03-07 10:29:21.888 4775 4775 E AndroidRuntime: at android.view.View.performClickInternal(View.java:7418)
03-07 10:29:21.888 4775 4775 E AndroidRuntime: at android.view.View.access$3700(View.java:835)
03-07 10:29:21.888 4775 4775 E AndroidRuntime: at android.view.View$PerformClick.run(View.java:28676)
03-07 10:29:21.888 4775 4775 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:938)
03-07 10:29:21.888 4775 4775 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
03-07 10:29:21.888 4775 4775 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:201)
03-07 10:29:21.888 4775 4775 E AndroidRuntime: at android.os.Looper.loop(Looper.java:288)
03-07 10:29:21.888 4775 4775 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7839)
03-07 10:29:21.888 4775 4775 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
03-07 10:29:21.888 4775 4775 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
03-07 10:29:21.888 4775 4775 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Suggested Fix
Add PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_MUTABLE when creating a PendingIntent in deleteAlarm method to comply with Android 12+ security requirements.
βοΈ Describe the bug
Deleting any habit causes the app to crash on Android 12.
π£ Steps to reproduce
π§ Expected behavior
The habit should be deleted without crashing the app.
π· Screenshots
App.Crashes.When.Deleting.a.Habit.on.Android.12.mp4
π± Tech info
π Additional context
Crash Log
Suggested Fix
Add
PendingIntent.FLAG_IMMUTABLEorPendingIntent.FLAG_MUTABLEwhen creating aPendingIntentindeleteAlarmmethod to comply with Android 12+ security requirements.