Skip to content

[messaging] Background notification behavior #518

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

Closed
theohdv opened this issue Oct 16, 2017 · 4 comments
Closed

[messaging] Background notification behavior #518

theohdv opened this issue Oct 16, 2017 · 4 comments
Labels
plugin: messaging FCM only - ( messaging() ) - do not use for Notifications

Comments

@theohdv
Copy link

theohdv commented Oct 16, 2017

Issue

When I received Remote Notification and my app is in background, the notification is displaied in the notification tray (normal behavior).

If I click on the notification, it opens the application and onMessage() is called and the notification object has all the data properties I sent.

But if i open the application not by clicking on the notification but by clicking in the application's icon. onMessage() is called but the notification object has nothing except:

{
  "opened_from_tray" : true // Which is false
  "fcm": {
    "action": "foobar"
  }
}

EDIT: This happened each time my application changes from background state to foreground state, so OnMessage() is called each time I open the application.

My data are not there and so it is difficult to know what need to be done.

Environment

Tested on Android but not on iOS

  1. Development Operating System:
    macOS Sierra

  2. React Native version:
    0.48.4

  3. RNFirebase Version:
    3.0.3

  4. Firebase Module:
    messaging

@Salakar Salakar added the plugin: messaging FCM only - ( messaging() ) - do not use for Notifications label Oct 17, 2017
@chrisbianca
Copy link
Contributor

Thanks for reporting. We're aware of lots of issues with notifications and will be addressing them all as part of the v3.2.0 release stream. Please see #595 for updates.

@ghost
Copy link

ghost commented Feb 25, 2018

@theohdv I am using 3.2.1 and i still see the issue. Do you see it resolved.

@Ehesp
Copy link
Member

Ehesp commented Feb 26, 2018

@togusa2017 it's been pushed back to 3.3.0 - see the issue linked above

@chrisbianca
Copy link
Contributor

Good news, the long awaited alpha of our messaging and notifications overhaul is now available!!

Check out the release notes here: https://github.com/invertase/react-native-firebase/releases/tag/v4.0.0-alpha.1

If you have any comments and suggestions or want to report an issue, come find us on Discord

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: messaging FCM only - ( messaging() ) - do not use for Notifications
Projects
None yet
Development

No branches or pull requests

4 participants