If say we are in the chat application screens, the expected behaviour is that notifications shouldn't be displayed as the content is already viewed.
How do I hide OneSignal notifications this way? There was an older method called setInFocusDisplayType I believe but I can't find it now since OneSignal.shared is gone.
Code of Conduct
[X] I agree to follow this project's Code of Conduct
Hello you are able to use the willDisplayListener and call preventDefault() when you don't want a notification to be displayed. For more migration details you can check out our documentation here.
How can we help?
If say we are in the chat application screens, the expected behaviour is that notifications shouldn't be displayed as the content is already viewed.
How do I hide OneSignal notifications this way? There was an older method called setInFocusDisplayType I believe but I can't find it now since OneSignal.shared is gone.
Code of Conduct