wix / react-native-notifications

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

Android 10 and below: NullPointerException: Attempt to invoke virtual method 'int android.content.Intent.getFlags()' on a null object reference #1020

Open WelcomeOnBoardCom opened 11 months ago

WelcomeOnBoardCom commented 11 months ago

We observe this issue only on android 10 and below: NullPointerException: Attempt to invoke virtual method 'int android.content.Intent.getFlags()' on a null object reference

Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'int android.content.Intent.getFlags()' on a null object reference at android.app.ContextImpl.startActivity (ContextImpl.java:861) at android.app.ContextImpl.startActivity (ContextImpl.java:845) at android.content.ContextWrapper.startActivity (ContextWrapper.java:377) at com.wix.reactnativenotifications.core.notification.PushNotification.launchOrResumeApp (PushNotification.java) at com.wix.reactnativenotifications.core.notification.PushNotification.digestNotification (PushNotification.java) at com.wix.reactnativenotifications.core.notification.PushNotification.onOpened (PushNotification.java) at com.wix.reactnativenotifications.RNNotificationsPackage.callOnOpenedIfNeed (RNNotificationsPackage.java) at com.wix.reactnativenotifications.RNNotificationsPackage.onActivityStarted (RNNotificationsPackage.java)

"react-native": "0.72.4", "react-native-notifications": "5.1.0"

android: compileSdkVersion = 33 targetSdkVersion = 33

WelcomeOnBoardCom commented 10 months ago

It works fine on "react-native-notifications": "4.3.1"