JonasBernard / FakeStandby

An Android app for turning the screen off while keeping apps running.
https://fakestandby.jonasbernard.de
GNU General Public License v3.0
425 stars 27 forks source link

[BUG] Crash on updating Fairphone to Android 12 #55

Open PeterKW opened 1 year ago

PeterKW commented 1 year ago

Anything I can try to make fake standby work again?

Thank you very much!

FATAL EXCEPTION: main Process: android.jonas.fakestandby, PID: 32729 java.lang.IllegalArgumentException: android.jonas.fakestandby: 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.buildServicePendingIntent(PendingIntent.java:727) at android.app.PendingIntent.getService(PendingIntent.java:689) at a.a.(Unknown Source:21) at android.jonas.fakestandby.service.AccessibilityOverlayService.onServiceConnected(SourceFile:2) at android.accessibilityservice.AccessibilityService.dispatchServiceConnected(AccessibilityService.java:762) at android.accessibilityservice.AccessibilityService.access$100(AccessibilityService.java:236) at android.accessibilityservice.AccessibilityService$2.onServiceConnected(AccessibilityService.java:2160) at android.accessibilityservice.AccessibilityService$IAccessibilityServiceClientWrapper.executeMessage(AccessibilityService.java:2404) at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:44) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7894) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1009)

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Device information:

PeterKW commented 1 year ago

Version 1.3.3 seems to be working for me now with the same problem on the newer version

https://f-droid.org/repo/android.jonas.fakestandby_10.apk

https://github.com/JonasBernard/FakeStandby/issues/47#issuecomment-1416361538

JonasBernard commented 1 year ago

Thank you for the report! The logs are actually very helpful. I think there is nothing a user can do about it except for downgrading to version 1.3.3 as suggested. I fixed the error, and it will be included in the next release. Give it a few days or even weeks until I finalize the release and the build bot of F-Droid has the release file ready. If you are impatient, you can download the new release from the releases page, however the apk-file is signed with my own key and not with the one by F-Droid (because they keep it secret). Thus, you would need to uninstall the app first and then install the apk you downloaded.

JonasBernard commented 1 year ago

Was this fixed for you after updating to version 1.3.5?

PeterKW commented 1 year ago

https://github.com/JonasBernard/FakeStandby/issues/47#issuecomment-1476660275