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.

Notifications on Android are not displaying in either Foreground or Background

See original GitHub issue

Notifications are not popping up on Android, but in IOS, it’s working properly. Any ideas?

Package Version '3.1.1'
buildToolsVersion '28.0.3'

Code :

  • Notification
 PushNotification.localNotification({
      title: "test title",
      message: "test message",
 });
  • Notification Configuration
PushNotification.configure({
    permissions: {
        alert: true,
        badge: true,
        sound: true
    },

    popInitialNotification: true,
    requestPermissions: true,
});

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
kalraneeraj24550commented, Jul 5, 2019

i noticed that my notifications come when i have android OS less than oreo. notifications were coming in my lollipop operating system. To let notifications come even in oreo devices . i added these lines in menifest

<meta-data  android:name="com.dieam.reactnativepushnotification.notification_channel_name"
    android:value="YOUR NOTIFICATION CHANNEL NAME"/>

<meta-data  android:name="com.dieam.reactnativepushnotification.notification_channel_description"
    android:value="YOUR NOTIFICATION CHANNEL DESCRIPTION"/>

these lines solved mine issue

0reactions
brianzzzasdcommented, Jul 4, 2019

I closed this Issue since it looks like a duplicate one.

Though I haven’t fixed this one yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Notifications not displayed when app is in foreground and ...
In implementation of FCM. you can not show notification in background until you didn't modify the JSON coming from FCM . You need...
Read more >
Android not displaying foreground and background notifications
Neither foreground nor background notifications are displaying in release mode. I can get them to work perfectly in debug mode, but the release ......
Read more >
How exactly do apps not running "in the background" receive ...
Since Android 8 apps cannot run background services. They either need to run a foreground service (with persistent notification; see the example ...
Read more >
Restrictions on starting activities from the background
Display notifications instead; Exceptions to the restriction ... This applies only when the app had either an activity in the foreground or an...
Read more >
Notifications | FlutterFire
The default behavior on all platforms is to display a notification only when the app is in the background or terminated. If required,...
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