Saturday, 17 April 2021

Do not show notification for one screen React Native

I have coded a chat app and I want to prevent the displaying of push notification in some screen for example when 2 users are chatting in the same room, the notification not showed to these 2 users but when someone leaves from the chat screen the user that left get a push notification but the user that stayed in chat screen not get a notification. I am new to React Native and Expo Notification services and I do not know how can I do that?

Note: I can detect which screen am I on. But I do not know how can I hide( For example, we can think 2 users A and B, and 2 chat rooms X and Y if user A and user B talked with each other in room X then these two user shouldn't receive push notification but when A leaves the room and B still in room X then just user A should receive push notification and user B souldn't receive notification) the received push notification for specific screen.



from Do not show notification for one screen React Native

No comments:

Post a Comment