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

Unable to resume activity on Android 12 #17

Open
grahaisw opened this issue Jun 10, 2022 · 1 comment
Open

Unable to resume activity on Android 12 #17

grahaisw opened this issue Jun 10, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@grahaisw
Copy link

grahaisw commented Jun 10, 2022

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.

@grahaisw grahaisw added the bug Something isn't working label Jun 10, 2022
@grahaisw
Copy link
Author

Hi, I just come back after I forked this repo and try to edit the file by myself and yes the issue on my apps was solved.

Since I cannot use git for publishabe package on Flutter, please consider my suggestion above to update this SDK on Flutter.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant