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
{{ message }}
This repository has been archived by the owner on Jun 18, 2023. It is now read-only.
Good morning,
I set the compileSdkVersion and targetSdkVersion to 31 in my gradle.build file. When I start the app on the emulator with android API 31. I encounter a problem within its Applications class specifically in isAccessibilityServiceActive() when it uses the getActivity() method of the PendingIntent class . In fact the flag within getActivity() is set only to PendingIntent.FLAG_UPDATE_CURRENT while for Android 12 should also be specified one of the two flags PendingIntent.FLAG_UPDATE_MUTABLE or PendingIntent.FLAG_UPDATE_IMMUTABLE.
Below the log of my app:
Caused by: java.lang.IllegalArgumentException: 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.getActivityAsUser(PendingIntent.java:458)
at android.app.PendingIntent.getActivity(PendingIntent.java:444)
at android.app.PendingIntent.getActivity(PendingIntent.java:408)
at com.aware.Applications.isAccessibilityServiceActive(Applications.java:664)
at it.uniroma1.di.tappigrafiaandroid.RequestPermission.checkedOrNot(RequestPermission.java:204)
at it.uniroma1.di.tappigrafiaandroid.RequestPermission.onCreate(RequestPermission.java:94)
at android.app.Activity.performCreate(Activity.java:8051)
at android.app.Activity.performCreate(Activity.java:8031)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3608)
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Good morning,
I set the compileSdkVersion and targetSdkVersion to 31 in my gradle.build file. When I start the app on the emulator with android API 31. I encounter a problem within its Applications class specifically in isAccessibilityServiceActive() when it uses the getActivity() method of the PendingIntent class . In fact the flag within getActivity() is set only to PendingIntent.FLAG_UPDATE_CURRENT while for Android 12 should also be specified one of the two flags PendingIntent.FLAG_UPDATE_MUTABLE or PendingIntent.FLAG_UPDATE_IMMUTABLE.
Below the log of my app:
Caused by: java.lang.IllegalArgumentException: 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.getActivityAsUser(PendingIntent.java:458)
at android.app.PendingIntent.getActivity(PendingIntent.java:444)
at android.app.PendingIntent.getActivity(PendingIntent.java:408)
at com.aware.Applications.isAccessibilityServiceActive(Applications.java:664)
at it.uniroma1.di.tappigrafiaandroid.RequestPermission.checkedOrNot(RequestPermission.java:204)
at it.uniroma1.di.tappigrafiaandroid.RequestPermission.onCreate(RequestPermission.java:94)
at android.app.Activity.performCreate(Activity.java:8051)
at android.app.Activity.performCreate(Activity.java:8031)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3608)
The text was updated successfully, but these errors were encountered: