Skip to content

Unable to resume activity on Android 12 #17

@grahaisw

Description

@grahaisw

Hi I have an issue on using this SDK for Android 12 with Flutter & I have used the recent version of this SDK 6.4.0.

So after I scanned MRZ on E-Passport, the app force close and show this error :

Unable to resume activity : java.lang.IllegalArgumentException: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.

I have check on Android official website about Pending Intent, that we should add FLAG.IMMUTABLE or FLAG.MUTABLE when create PendingIntent, here's the link :

https://developer.android.com/guide/components/intents-filters#kotlin:~:text=Create%20immutable%20pending%20intents%20whenever%20possible

And I also have checked that this SDK file "FlutterDocumentReaderApiPlugin.java", still not implement PendingIntent like the official docs mentioned above, here the existing code on the file :

PendingIntent pendingIntent = PendingIntent.getActivity(activity.getApplicationContext(), 0, intent, 0);

So what do you think?does this SDK need to implement that for support Android 12?

Or do you have any other solution about this issue?

I have followed the example, but i think it's use different implementation.

  • OS: Android
  • OS version: 12

Thank you, please let me know if you need any additional information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions