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.

Android: Notifications actions doesn't work when app is not running

See original GitHub issue

I’ve followed the documentation, added actions property to notification data. Also added listener for notificationActionReceived. Everything works fine… when app is running (either in foreground or background). But when it is not active (eg. was stopped/killed by user) tapping on notification action doesn’t work.

In such case notification stays in place and nothing happen. It is not dismissed nor executed.

Do I missing something eg. in AndroidManifest or another listener?

/cc @varungupta85

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:8

github_iconTop GitHub Comments

2reactions
dlukszacommented, Jan 17, 2018

You can try my PR (https://github.com/zo0r/react-native-push-notification/pull/632), it fixes this issue.

BTW. Read through readme first, it requires some modifications in app code.

1reaction
dlukszacommented, Jun 15, 2018

@adirzoari, @vvavepacket have a look into the readme file of my fork https://github.com/dluksza/react-native-push-notification/#notification-actions

BTW. I’ve reimplemented this feature in react-native-firebase where it was merged and has a decent documentation how to use it https://rnfirebase.io/docs/v4.2.x/notifications/android-actions

The key in both cases is the exported service that listens for incoming actions from the notification.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Notifications Not Showing Up? 10 Fixes You Can Try
Not seeing notifications show up on your Android phone? Try these fixes to get Android notifications working again.
Read more >
Android notification action buttons are not working when app ...
I am creating my first android app, it is a vocabulary quiz. I am trying to send notification every hour (using PeriodicWorkRequest - ......
Read more >
Behavior changes: all apps - Android Developers
The Android 12 platform includes behavior changes that may affect your app. The following behavior changes apply to all apps when they run...
Read more >
Troubleshooting Duo Push notification issues on Android ...
To confirm whether Push notifications are working for end-users, ... the Approve button in the Duo Mobile app, but no push notifications are...
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