Log
Caused by java.lang.IllegalArgumentException: com.robertlevonyan.testy: 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:375)
at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645)
at android.app.PendingIntent.getBroadcast(PendingIntent.java:632)
at com.hbisoft.hbrecorder.ScreenRecordService.onStartCommand(ScreenRecordService.java:14)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4632)
at android.app.ActivityThread.access$1900(ActivityThread.java:247)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2084)
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:7822)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Describe the bug Error on Android 12
Log Caused by java.lang.IllegalArgumentException: com.robertlevonyan.testy: 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:375) at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645) at android.app.PendingIntent.getBroadcast(PendingIntent.java:632) at com.hbisoft.hbrecorder.ScreenRecordService.onStartCommand(ScreenRecordService.java:14) at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4632) at android.app.ActivityThread.access$1900(ActivityThread.java:247) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2084) 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:7822) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Can it be reproduced in demo app Yes
HBRecorder version for example 2.0.0
Device information
Pixel 3 XL 31