wix / react-native-notifications

React Native Notifications
MIT License
3.25k stars 764 forks source link

RN 0.68 - Android 12 (API 31) - RNN 4.2.4 - Issues #850

Closed claudiozam closed 2 years ago

claudiozam commented 2 years ago

Bug summary

After upgrading to 0.68.0 and targetSdkVersion 31 (Android 12) It always restarts or opens a new activity. Different behavior of RN 0.67 and targetSdkVersion 30

Case 1

Dead state (100% dead) or Fake dead state (if I close the app with the android back button) Send 2 notifications Click on one notification message The app opens ok Notifications.getInitialNotification() returns data While the app is open click on the second notification message App will open again (restarting the main activity). Notifications.getInitialNotification() returns no data Notifications.events().registerNotificationOpened() returns data

Case 2

Background state Send 2 notifications Click on one notification message App will open again (restarting the main activity). Notifications.getInitialNotification() returns data While the app is open click on the second notification message Notifications.getInitialNotification() returns no data Notifications.events().registerNotificationOpened returns data

Library version

4.2.4

Environment info

System: OS: macOS 12.3 CPU: (4) x64 Intel(R) Core(TM) i5-6360U CPU @ 2.00GHz Memory: 191.68 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 17.7.2 Yarn: 1.22.18 npm: 8.5.2 Managers: CocoaPods: 1.11.2 SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5 IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8193401 Xcode: 13.3/13E113 - /usr/bin/xcodebuild Languages: Java: 11.0.14.1 - /usr/bin/javac npmPackages: react: 17.0.2 => 17.0.2 react-native: 0.68.0 => 0.68.0

Steps to reproduce

Upgrade to 0.68 using react-native-upgrade-helper https://react-native-community.github.io/upgrade-helper/ RN new architecture opt-in: disabled.

Tested on a real device (Samsung S10 - Android 12)

Thanks

enahum commented 2 years ago

same issue, seems to be related to TaskStackBuilder but I really know nothing about how it works

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] commented 2 years ago

The issue has been closed for inactivity.