Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 12 Support #3

Open
danherrera opened this issue Dec 7, 2021 · 1 comment
Open

Android 12 Support #3

danherrera opened this issue Dec 7, 2021 · 1 comment

Comments

@danherrera
Copy link

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)
@dshalaby
Copy link
Member

dshalaby commented Dec 7, 2021

Hello,

Thank you for raising this issue. Yes we do plan on supporting Android 12. I will look into adding this flag, however at the moment I can't recall if we're ever mutating this so I'll check and update this issue.

Feel free to make a pull request too if you think you already have the fix 🙂

Thank you for choosing Tappy NFC readers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants