Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setNotificationWillShowInForegroundHandler but for background #437

Closed
MiranKm opened this issue Jul 16, 2021 · 4 comments
Closed

setNotificationWillShowInForegroundHandler but for background #437

MiranKm opened this issue Jul 16, 2021 · 4 comments
Labels
Help Wanted Extra attention is needed

Comments

@MiranKm
Copy link

MiranKm commented Jul 16, 2021

Description:

setNotificationWillShowInForegroundHandler works only when the app is in focus is there a way to not show a certain notification when the app is in the background?

I looked around a lot and didn't find anything, if there isn't a way to do that could this issue be turned into a feature request

I've linked this on stackoverflow someone else had this issue but it seems it worked for their case
Reference

@malvinpratama
Copy link

i have same problem.
if use sdk < 3.0.0 it's work with setNotificationReceivedHandler.
in setNotificationReceivedHandler you can handle the data even if the app is out of focus.
but in setNotificationWillShowInForegroundHandler your app must be in focus.
i don't know it's an SDK issue or the documentation to handle cases like this doesn't exist but can handle cases like this.

@WillowWisp
Copy link

Kinda weird that this isn't supported, especially since it was supported in the past. Does anyone know the reason why they removed this?

@emawby emawby added the Help Wanted Extra attention is needed label Sep 16, 2021
@hugoyair
Copy link

hugoyair commented Nov 1, 2021

You must use setNotificationOpenedHandler because you are background, so, when you press to the notification that listener called setNotificationOpenedHandler will listen it and enter to the listener. setNotificationWillShowInForegroundHandler is used when you are into to your app not outside

@emawby
Copy link
Contributor

emawby commented Jan 30, 2024

Closing issue as stale. If this is still happening in 2024 feel free to tag me to reopen

@emawby emawby closed this as completed Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants