-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Actions not responding after backing out of app on Android #294
Comments
Same here +1 |
+1 |
Hi, I am not sure how would the audio play if the app is completely closed. But you can definitely control some of the actions in the native code directly. It is not there in this package for obvious reasons but you can check out how are the actions handled right now and you will get a good idea of how you can achieve it if you are familiar with Java. Basically, you can add that action to the notification in the js code and then in the native code instead of firing the notification action event for such actions, handle them directly right there. HTH |
Although the ability to handle notification actions when the app is not running is still an issue which I am also having at the moment and not able to spend time to find a way to fix it. I guess we want the app to start on receiving a notification of it is not currently running and make sure that the notification actions are initialized without needing any component to be mounted. A commit from @mlambert did add such functionality but I don't have that code in my fork since it doesn't play nice with one of the packages that I am using. |
+1. My app suffers from this as I rely on an ongoing notification with actions, we need some sort of solution |
I've had this working, there is some info in the trouble shooting guide. You need to code your app in such a way that the RN-push-notifications It might be a significant code change to get this working. I've had to essentially create a headless js app with no react-native in it at all, then I just use react-native as a display mechanism. |
Hello @npomfret, Is this very complex? Do you have any documentation? Thank you. |
There's no documentation. But it's not necessarily complex depending on what state your application is it. It's just a bit complex to explain. It was explained to me when the PR went in here: #220 |
Thanks @npomfret |
@jaisonveneri Please let us know if you managed to get this working, because I didn't. |
@EdenGottlieb |
@EdenGottlieb I get the notification when the app is closed and I can see that the process is started but when I click on the notification I don't get anything from Anyone has a solution for this? |
@npomfret I've done as you told - moved my react-native-push-notification code to Btw, I got everything else working - in app notifications and background notifications. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions. |
Hey there,
I've got some local notifications with an action running for an audio app. The actions work great when the app is running (including when in the background), but they don't seem to respond when the app's been closed. Specifically, the action should stop audio playback.
Tapping the notification itself will re-launch the app, which is fine, but tapping an action just clears the notification. The action itself fires some code in RN, which is then passed over to some native code to control playback.
So if there isn't a way to fire that RN code from an action when the app is closed, is there a way for an action to be tied directly to some native code instead?
Thanks!
The text was updated successfully, but these errors were encountered: