invertase / react-native-firebase

🔥 A well-tested feature-rich modular Firebase implementation for React Native. Supports both iOS & Android platforms for all Firebase services.
https://rnfirebase.io
Other
11.53k stars 2.19k forks source link

values getting cleared in notification tray in android #1983

Closed venkat-waran closed 5 years ago

venkat-waran commented 5 years ago

Issue

Im using data only messages for push notification. Sometimes values getting cleared in notification system tray in android ` firebase.messaging().onMessage((message) => {

  const notification = new firebase.notifications.Notification({
    sound: "default",
    show_in_foreground: true
  })
  .setNotificationId('notificationId')
  .setTitle(message && message.data && message.data.title)
  .setBody(message && message.data && message.data.body)
  .setSubtitle(message && message.data && message.data.subtitle)
  if(Platform.OS == "android"){
    notification
    .android.setChannelId('xxxxxxx')
    .android.setSmallIcon("@mipmap/notif_icon")
    .android.setLargeIcon("@mipmap/ic_launcher")
    .android.setPriority(firebase.notifications.Android.Priority.High)
  }
  if(message && message.data && message.data.bigPicture){
    notification.android.setBigPicture(message.data.bigPicture)
  }
  firebase.notifications().displayNotification(notification);
});

`


Project Files

iOS

ios/Podfile:

# N/A

AppDelegate.m:

// N/A

Android

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


Think react-native-firebase is great? Please consider supporting the project with any of the below:

stale[bot] commented 5 years ago

Hello 👋, this issue has been automatically marked as stale because it has not had activity for quite some time. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information.