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

fix: launch app with NFC when in background #2

Merged
merged 9 commits into from
Jul 30, 2024
Merged

fix: launch app with NFC when in background #2

merged 9 commits into from
Jul 30, 2024

Conversation

dwettstein
Copy link
Collaborator

Pull Request from original repository: chariotsolutions#470

SachinAgarwal1337 and others added 6 commits February 23, 2022 13:46
The plugin works perfectly in all devices except for Andorid 12. 
I get following error
```
 Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent
```

I see the problem is in  `createPendingIntent` Method
```
 private void createPendingIntent() {
        if (pendingIntent == null) {
            Activity activity = getActivity();
            Intent intent = new Intent(activity, activity.getClass());
            intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
            pendingIntent = PendingIntent.getActivity(activity, 0, intent, 0); // Problem in the last param here
        }
    }
```

This PR solves the problem by just adding the requried flag which also works for lower android versions
* master:
  Adding back NDEF as supported NFC format
  Fix: Android SDK 34 removes support for NFC push
  Fix: Return URL from intent when tag is unavailable
  iOS fixes
  Fix: 'new' is not available error in XCode 14.3
  Chore: Merging fixes from other forks
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

Successfully merging this pull request may close these issues.

3 participants