Ignore notification if app is opened in foreground

On Android, I am calling dismissAllNotificationsAsync when a notification is received and the app is opened and in the foreground.

However, half of the time, the notification still has time to appear for a split second before being dismissed.

How can I not show a notification at all if the app is opened in the foreground?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.