-1

How can show accept reject button in push notification in react native

I want accept reject button in my notifications in react native. So if notification relates that if they want to accept they can click on accept or they want to reject they can reject.

Please help me out for the same.Notification will work in foreground and background. Currently, I am getting the notification on both background and foreground.

2
  • For now I am opening a modal and that's working fine for me but is there anything other method that can help me out? Commented Jul 2, 2024 at 6:57
  • Will you ever include minimal reproducible example in your question? Also it needs to be edited, because right now it doesn't make much sense. Commented Jul 2, 2024 at 6:58

1 Answer 1

0

For now I am opening a modal and that's working fine for me.

In background when I received the notification and on function onNotificationOpenedApp in callback I am dispatching the data and opening a modal based on the data.

Same in foreground, when I am receiving notification in calllback I open a modal by using dispatch and state management.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.