Android: Notifications actions doesn't work when app is not running
See original GitHub issueI’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:
- Created 6 years ago
- Reactions:2
- Comments:8
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
@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-actionsThe key in both cases is the exported service that listens for incoming actions from the notification.