-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
firebase.notifications().getInitialNotification().then((notificationOpen: NotificationOpen) => Not working Always return Null in App.js #2768
Comments
You must follow the template or we close the issue As a hunch maybe make sure this isn't affecting you if you are on android crazycodeboy/react-native-splash-screen#289 (comment) |
Hello @mikehardy please check above code and comments i have mention all information which is related to firebase |
You have picked and chosen which data to show, I can't spend time troubleshooting that way. You did not address my comment about possible splash-screen interaction and only the whole AndroidManifest.xml would show it. |
thank-you thank-you thank-you thank-you thank-you thank-you thank-you thank-you thank-you thank-you thank-you thank-you thank-you thank-you thank-you sooooo much to share me this link crazycodeboy/react-native-splash-screen#289 (comment) |
By my count you are at least the 12th person just from this repo that has had that issue. 😅 glad that worked. |
@mikehardy Sorry, i face this issue, but android works fine. IOS is problem.
any idea, Gents! |
I'm facing this issue as well. Any updates? |
@ramonvermeulen I am also having the same issue, except that my react native version is |
Did anyone find a solution for this error? I planned to upgrade from version 3.3.1 to 5.5.6 but apparently I will not do so for now. |
Hi, do you have remote debugging enabled? I had the same issue last week with I came to the solution after encountering a similar behaviour with React Native's Linking module. |
@davidwlhlm that seems like such a gotcha - could you propose a PR to the docs with a troubleshooting section or something? I can't imagine the time lost trying to find that, and you've already found it :-). All docs have an edit button top-right |
i knew this issue, but the problem is i reported on real device with ipa and app from appstore. |
Dear @minhnguyenwp |
Push notification does not give call back if there are multiple notifications in the notification console and when one notification is already clicked then clicking on another notification from the notification tray after closing the app does not call any notification life cycle method. Let's say there are 5-6 notifications in the console, we click on one of the notification which opens up the app and works as expected and calls the related methods. After that when we close the app and then click on another notification from the notification console then it does not call any notification method. I am using "react-native": "0.61.4", and "@react-native-firebase/messaging": "^7.4.2", |
I am not sure if it is still related but for those who are using 'react-native-splash-screen', if you can, do not use this package as it has a number of serious unobservable issues. Make sure your SplashActivity.java is similar to this. I found this after getting null for three hours -------------------------SplashActivity.java -------------------------------------------------------------------- package com.nameOfYourPackage; import android.content.Intent; public class SplashActivity extends AppCompatActivity {
} |
@CoconutSiloDev |
Issue
Describe your issue here
Hello team,
I am facing an issues with background notification as per your document. I am using this function For example :-
**_
So, when my application is in background or killed state and meanwhile i am click on notification.
getInitialNotification() always return NULL.
Note :- I am able to received notification in foreground/background state but in background state not able to read notification data/payload.
Testing payload type 👍
_**
Project Files
iOS
Click To Expand
ios/Podfile
:Here is my pod file data this content is only for firebase library.
Required by RNFirebase
Firebase
pod 'Firebase', '
> 5.20.0'> 5.20.0'pod 'Firebase/Core', '
pod 'Firebase/Analytics', '
> 5.20.0'> 5.20.0'pod 'Firebase/DynamicLinks', '
pod 'Firebase/Messaging', '~> 5.20.0'
pod 'React', path: rn_path, subspecs: [
'Core',
'CxxBridge',
'DevSupport',
'RCTActionSheet',
'RCTAnimation',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket',
]
React-Native libraries
pod 'yoga', path: "#{rn_path}/ReactCommon/yoga"
pod 'RNFirebase', :path => '../node_modules/react-native-firebase/iOS'
pod "yoga", :path => "../node_modules/react-native/ReactCommon/yoga"
#pod 'React', :path => '../node_modules/react-native/'
pod 'Folly', :podspec => "#{rn_path}/third-party-podspecs/Folly.podspec"
post_install do |installer|
rnfirebase = installer.pods_project.targets.find { |target| target.name == 'RNFirebase' }
Android
Click To Expand
Have you converted to AndroidX?
android/gradle.settings
jetifier=true
for Android compatibility?jetifier
for react-native compatibility?android/build.gradle
://For Android
android/app/build.gradle
:android/settings.gradle
:include ':react-native-firebase'
project(':react-native-firebase').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase/android')
MainApplication.java
:import io.invertase.firebase.RNFirebasePackage;
import io.invertase.firebase.analytics.RNFirebaseAnalyticsPackage;
import io.invertase.firebase.messaging.RNFirebaseMessagingPackage;
new RNFirebasePackage(),
new RNFirebaseMessagingPackage(), // <-- Add this line
new RNFirebaseAnalyticsPackage(), // <-- Add this line
new RNFirebaseNotificationsPackage()
AndroidManifest.xml
:xml
Environment
Click To Expand
react-native info
output:info
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: (4) x64 Intel(R) Core(TM) i5-4308U CPU @ 2.80GHz
Memory: 17.79 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.15.3 - /usr/local/bin/node
npm: 6.4.1 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 23, 25, 27, 28
Build Tools: 23.0.1, 28.0.3
System Images: android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5791312
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.1 => 16.8.1
react-native: ^0.59.3 => 0.59.3
npmGlobalPackages:
create-react-native-app: 2.0.2
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
react-native-firebase
version you're using that has this issue:Firebase
module(s) you're using that has the issue:e.g. Instance ID
TypeScript
?Think
react-native-firebase
is great? Please consider supporting all of the project maintainers and contributors by donating via our Open Collective where all contributors can submit expenses. [Learn More]React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: