Current-Activity icon indicating copy to clipboard operation
Current-Activity copied to clipboard

Carsh

Open alha7999 opened this issue 1 year ago • 4 comments
trafficstars

*********************** Crash Head *********************** Time Of Crash : 21-03-2024 18:23 Device Manufacturer : Xiaomi Device Model : M2007J20CI Android Version : 12 Android SDK : 31 App VersionName : 1.5.8 App VersionCode : 20

*********************** Crash Log *********************** java.lang.RuntimeException: Unable to pause activity {io.github.ratul.topactivity/io.github.ratul.topactivity.ui.MainActivity}: java.lang.IllegalArgumentException: io.github.ratul.topactivity: 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.ActivityThread.performPauseActivityIfNeeded(ActivityThread.java:5201) at android.app.ActivityThread.performPauseActivity(ActivityThread.java:5152) at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:5104) at android.app.servertransaction.PauseActivityItem.execute(PauseActivityItem.java:47) at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2291) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:210) at android.os.Looper.loop(Looper.java:299) at android.app.ActivityThread.main(ActivityThread.java:8319) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1038) Caused by: java.lang.IllegalArgumentException: io.github.ratul.topactivity: 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:378) at android.app.PendingIntent.getActivitiesAsUser(PendingIntent.java:596) at android.app.PendingIntent.getActivities(PendingIntent.java:578) at android.app.TaskStackBuilder.getPendingIntent(TaskStackBuilder.java:275) at android.app.TaskStackBuilder.getPendingIntent(TaskStackBuilder.java:249) at io.github.ratul.topactivity.model.NotificationMonitor.c(Unknown Source:95) at io.github.ratul.topactivity.ui.MainActivity.onPause(Unknown Source:10) at android.app.Activity.performPause(Activity.java:8374) at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1531) at android.app.ActivityThread.performPauseActivityIfNeeded(ActivityThread.java:5191) ... 14 more

alha7999 avatar Mar 21 '24 12:03 alha7999

I also encountered the same mistake

*********************** Crash Head *********************** Time Of Crash : 15-05-2024 10:22 Device Manufacturer : Xiaomi Device Model : 2308CPXD0C Android Version : 14 Android SDK : 34 App VersionName : 1.5.5 App VersionCode : 15

*********************** Crash Log *********************** java.lang.RuntimeException: Unable to pause activity {io.github.ratul.topactivity/io.github.ratul.topactivity.ui.MainActivity}: java.lang.IllegalArgumentException: io.github.ratul.topactivity: 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.ActivityThread.performPauseActivityIfNeeded(ActivityThread.java:5521) at android.app.ActivityThread.performPauseActivity(ActivityThread.java:5472) at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:5424) at android.app.servertransaction.PauseActivityItem.execute(PauseActivityItem.java:48) at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:190) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:101) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2589) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:224) at android.os.Looper.loop(Looper.java:318) at android.app.ActivityThread.main(ActivityThread.java:8759) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:561) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013) Caused by: java.lang.IllegalArgumentException: io.github.ratul.topactivity: 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.checkPendingIntent(PendingIntent.java:430) at android.app.PendingIntent.getActivitiesAsUser(PendingIntent.java:680) at android.app.PendingIntent.getActivities(PendingIntent.java:663) at android.app.TaskStackBuilder.getPendingIntent(TaskStackBuilder.java:275) at android.app.TaskStackBuilder.getPendingIntent(TaskStackBuilder.java:249) at io.github.ratul.topactivity.model.NotificationMonitor.c(Unknown Source:95) at io.github.ratul.topactivity.ui.MainActivity.onPause(Unknown Source:10) at android.app.Activity.performPause(Activity.java:9110) at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1669) at android.app.ActivityThread.performPauseActivityIfNeeded(ActivityThread.java:5511) ... 14 more

AceInAndroid avatar May 15 '24 02:05 AceInAndroid

https://github.com/codehasan/Current-Activity/issues/25#issue-2200057230

@alha7999, use Markdown code blocks:

```log
log content
```

RokeJulianLockhart avatar Jun 22 '24 09:06 RokeJulianLockhart

https://github.com/codehasan/Current-Activity/issues/25#issuecomment-2183963748

Additionally, a more descriptive title (and a description too) please.

RokeJulianLockhart avatar Jun 22 '24 09:06 RokeJulianLockhart

Try the PR I submitted, I hope it can help you!

https://github.com/codehasan/Current-Activity/pull/28

Asura-64 avatar Aug 20 '24 08:08 Asura-64