zo0r / react-native-push-notification

React Native Local and Remote Notifications
MIT License
6.73k stars 2.05k forks source link

On Click Action button not working in react native push notification. #2337

Closed ashishmangukiya closed 5 months ago

ashishmangukiya commented 1 year ago

Bug

When app is running in background(not killed) and if i receive any push notification and if i try to click on any action button (Yes, No) then I do come back to app through .invokeApp() but if the app is not running in background(killed) then Nothing happens on click action buttons.

Library version: react-native-push-notification : 8.1.1

Describe what you expected to happen:

  1. when I click on any action button then it should redirect me to respected navigation page or home page.
ashishmangukiya commented 1 year ago

Because on below code, getting failed when click on action buttons (killed app).

mReactInstanceManager.addReactInstanceEventListener(new ReactInstanceManager.ReactInstanceEventListener() { public void onReactContextInitialized(ReactContext context) { handleRemotePushNotification((ReactApplicationContext) context, bundle); mReactInstanceManager.removeReactInstanceEventListener(this); } });

'com.facebook.react.ReactInstanceManager.ReactInstanceEventListener' is deprecated

aotaduy commented 1 year ago

Got same error, but I'm not using action buttons, it happened after updating targetSdkVersion to 31

hetansh-Tatvasoft commented 1 year ago

@aotaduy I also got same error yesterday, but I've updated targetSdkVersion to 31 few releases back not sure what sure what triggered it this time...☹️

github-actions[bot] commented 6 months ago

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.