I use expo notifification, with ios, the notification is not received when the app is open, but with android the notification is displayed, do you have a solution for android to received notification only when the app not opened, like IOS ?
Thank you all,
For exemple in chat, we receive the message on live with a notification in more.
You can use a combination of RN’s AppState API and Expo’s Notifications.addListener to dismiss notifications. Here’s the code I’ve implemented to do so:
Can you elaborate on what you mean? If the app is running in the background, this.state.appState === "background" so it won’t be dismissed if that’s what you’re wondering.