question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Push Notification not displaying in status bar

See original GitHub issue

Bug

Push notifications can able receive in receiver but could not display in Status bar.

Environment info

System:
    OS: macOS 10.15.6
    CPU: (4) x64 Intel(R) Core(TM) i5-5350U CPU @ 1.80GHz
    Memory: 829.48 MB / 8.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 13.8.0 - /usr/local/bin/node
    Yarn: Not Found
    npm: 6.13.7 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK: Not Found
    Android SDK:
      API Levels: 23, 25, 28, 29, 30
      Build Tools: 28.0.3, 29.0.3, 30.0.0, 30.0.2
      System Images: android-29 | Google APIs Intel x86 Atom, android-R | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6626763
    Xcode: /undefined - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_242 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.11.0 => 16.11.0 
    react-native: ^0.63.2 => 0.63.2 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Library version: “react-native-push-notification”: “^4.0.0”,

Steps To Reproduce - Scenario 1

  1. Receiver can able to receive notifications from FCM, printing logs
  2. Notification data is sent jsDelivery.notifyNotification(bundle);
  3. config.getNotificationForeground() getting false

Steps To Reproduce - UseCase 2

  1. Receiver can able to receive notifications from FCM, printing logs 2.context is null
  2. config.getNotificationForeground() getting false …

Describe what you expected to happen:

  1. Need to display the notification in status bar

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:17

github_iconTop GitHub Comments

4reactions
Dallas62commented, Oct 21, 2020

Please do not downgrade. To make notifications work, just follow the changelog and create a Channel. As I said: read the Channel part! Regards

4reactions
rbarri777commented, Oct 21, 2020

I have the same issue and I read the instructions in the Changelog and I added in my AndroidManifest.xml the configurations for the Channels. In ChangeLog said that default channel is “fcm_fallback_notification_channel” and my problem is that when I send a remote notification (from Firebase console), I don’t see the notification like the @brijeshmkt image. Only I can see the information in my console:

NOTIFICATION: {"channelId": "fcm_fallback_notification_channel", "color": null, "data": {}, "finish": [Function finish], "foreground": true, "id": "404230", "message": "task again", "priority": "high", "sound": null, "tag": "campaign_collapse_key", "title": "new", "userInteraction": false, "visibility": "private"}

I can receive push in background, because I close my app and retry to send a new notification and the notification appears in statusbar.

The more curious, is that when I open again the same app and send another notification now sometimes the notification appears in the statusbar and I can see the same information in my console: (with different message of course)

NOTIFICATION: {"channelId": "fcm_fallback_notification_channel", "color": null, "data": {}, "finish": [Function finish], "foreground": true, "id": "-2109342", "message": "With my notification 2", "priority": "high", "sound": null, "tag": "campaign_collapse_key", "title": "What happend", "userInteraction": false, "visibility": "private"}

Why doesn’t show the notification the first time that I send push? (I tried installed and uninstalled the app to replicate the same behavior) What’s wrong?

Read more comments on GitHub >

github_iconTop Results From Across the Web

android - Push notification is not showing on notification bar
I have implemented the firebase push notification by following a YouTube video and its working fine when app is in the background but...
Read more >
Android Notifications Not Showing Up? 10 Fixes You Can Try
Android Notifications Not Showing Up? 10 Fixes You Can Try · 1. Reboot Your Phone · 2. Review the App's Notification Settings ·...
Read more >
Notifications Not Shown - Mobile Push
Common reasons why Mobile Push notifications are not showing on your device. ... Settings > Notifications & status bar > Turn on "Show...
Read more >
What to do when Android notifications are not working
You may have accidentally turned off either the system notifications or the app's push notifications. Go to settings and make sure both of...
Read more >
Control notifications on Android - Google Support
Open your phone's Settings app. ... Notifications on lock screen. Choose your phone's notification defaults: Show conversation, default, and silent; Hide silent ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found