BanDev / BuddhaQuotes

A collaborative project to create a Free and Open Source Buddha Quotes app for Android
GNU General Public License v3.0
37 stars 20 forks source link

Crash when adding widget #366

Open hjek opened 1 month ago

hjek commented 1 month ago

Describe the bug Crash when adding widget. Widget stuck on one quote.

To Reproduce Steps to reproduce the behavior:

  1. Add widget (in KISS Launcher)
  2. App crashes, error is displayed (See below).
  3. Widget says "A disciplined mind brings happiness". Clicking does not change quote.

Expected behavior I expected alp not to crash when adding widget. I expected a new quote to be displayed when clicking widget.

Smartphone (please complete the following information):

Additional context Error displayed in app:

java.lang.IllegalArgumentException: org.bandev.buddhaquotes: 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.
    at android.app.PendingIntent.checkFlags(PendingIntent.java:401)
    at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:671)
    at android.app.PendingIntent.getBroadcast(PendingIntent.java:658)
    at m6.e.e(SourceFile:191)
    at m6.d.h(SourceFile:91)
    at a5.a.b(SourceFile:1)
    at n5.a0.run(SourceFile:1)
    at kotlinx.coroutines.internal.e.run(Unknown Source:11)
    at kotlinx.coroutines.scheduling.i.run(Unknown Source:2)
    at kotlinx.coroutines.scheduling.a.run(SourceFile:77)
    Suppressed: e2.a: [f1{Cancelling}@da75c4f, Dispatchers.IO]
thekrishnajeena commented 1 month ago

Hi, I'd like to work on this issue. Could you please assign it to me?