SDK Version: 41
Platforms(Android/iOS/web/all): all
I have an in-app chat base on signalR and react-native.
When I receive a message I correctly get a push notification,
but I’d like to disable the OS notification when I’m inside the chat that generated the notification,
it is a very bad user experience to have both the conversation updated and the OS notification about the same message.
I use
Notifications.setNotificationHandler({
handleNotification: async () => ({
shouldShowAlert: true,
shouldPlaySound: false,
shouldSetBadge: false,
}),
});
to configure the foreground behavior but how make the “shouldShowAlert” depending on the current screen?
any ideas?
thanks