Skip to content

Android 12 Support #3

@danherrera

Description

@danherrera

Hello,

I understand the current libraries are targeting API 29. Is there a plan to update to 31?

Starting with Android 12 (API 31), the Android system is requiring applications to define PendingIntents as mutable or immutable via a flag. Unfortunately, this results in a crash when a PendingIntent does not include this flag, which occurs when instantiating UsbPermissionDelegate.

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.taptrack.tcmptappy2.usb.UsbPermissionDelegate.<init>(UsbPermissionDelegate.java:59)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions