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

[🐛] Notification trigger to identify which notification has opened App, is not happening. #4866

Closed
3 of 10 tasks
vaibhavarora14 opened this issue Feb 4, 2021 · 3 comments
Closed
3 of 10 tasks
Labels
help: needs-triage Issue needs additional investigation/triaging. type: bug New bug report

Comments

@vaibhavarora14
Copy link

vaibhavarora14 commented Feb 4, 2021

Issue

Two problems -

  • App is getting opened on second click of Notification.
  • Which notification has triggered to open the App is not getting detected.

Versions used -

  • "@react-native-firebase/app": "^10.5.0"
  • "@react-native-firebase/messaging": "^10.5.1"
messaging()
  .getInitialNotification()
  .then(remoteMessage => {
    console.log('getInitialNotification', remoteMessage);
  });

messaging().onNotificationOpenedApp(listener => {
  console.log('onNotificationOpenedApp', listener);
});

messaging().setBackgroundMessageHandler(async remoteMessage => {
  console.log('setBackgroundMessageHandler', remoteMessage);
});

BackgroundMessageHandler triggers and logs data when device receives notification.
But onNotificationOpenedApp is not triggered.
And initialNotification gives null data


Project Files

Javascript

Click To Expand

package.json:

# N/A

firebase.json for react-native-firebase v6:

# N/A

iOS

Click To Expand

ios/Podfile:

  • I'm not using Pods
  • I'm using Pods and my Podfile looks like:
# N/A

AppDelegate.m:

// N/A


Android

Click To Expand

Have you converted to AndroidX?

  • my application is an AndroidX application?
  • I am using android/gradle.settings jetifier=true for Android compatibility?
  • I am using the NPM package jetifier for react-native compatibility?

android/build.gradle:

// N/A

android/app/build.gradle:

// N/A

android/settings.gradle:

// N/A

MainApplication.java:

// N/A

AndroidManifest.xml:

<!-- N/A -->


Environment

Click To Expand

react-native info output:

 OUTPUT GOES HERE
  • Platform that you're experiencing the issue on:
    • iOS
    • Android
    • iOS but have not tested behavior on Android
    • Android but have not tested behavior on iOS
    • Both
  • react-native-firebase version you're using that has this issue:
    • e.g. 5.4.3
  • Firebase module(s) you're using that has the issue:
    • e.g. Instance ID
  • Are you using TypeScript?
    • Y/N & VERSION


@vaibhavarora14 vaibhavarora14 added help: needs-triage Issue needs additional investigation/triaging. type: bug New bug report labels Feb 4, 2021
@vaibhavarora14 vaibhavarora14 changed the title [🐛] Notification trigger to indentify which notification has opened App, is not happening. [🐛] Notification trigger to identify which notification has opened App, is not happening. Feb 4, 2021
@mikehardy
Copy link
Collaborator

Sounds interesting but if you skip the template, we close the issue

@vaibhavarora14
Copy link
Author

oh man, how many things needs to be filled?

@mikehardy
Copy link
Collaborator

@varora1406 all the things that you would need if you were developer and a colleague came to you with a problem, in other words, the things we indicate. You want free help? You provide the information we request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help: needs-triage Issue needs additional investigation/triaging. type: bug New bug report
Projects
None yet
Development

No branches or pull requests

2 participants