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

Add badge when receive notification #627

Closed
ghost opened this issue Mar 30, 2018 · 3 comments
Closed

Add badge when receive notification #627

ghost opened this issue Mar 30, 2018 · 3 comments
Labels

Comments

@ghost
Copy link

ghost commented Mar 30, 2018

I try to add badge number when receive message from server but it don't add badge number until I tapped on notification.

How to add badge number when device receive message?
Help me please.

  • I use setBadgeNumber and onNotificationOpen
    ************************ My code ************************
    this.firebase.onNotificationOpen().subscribe((res) => {
    this.firebase.setBadgeNumber(1)
    if(res.tap){
    console.log("Received in background");
    } else {
    console.log("Received in foreground");
    }
    }, (err) => console.log(err) )
@remisture
Copy link

Set badge number when you send the message.

@ghost
Copy link
Author

ghost commented Apr 3, 2018

@remisture Yes. I try to set badge number (badge = 1). I send it but if I receive message and do not open notification or application when I send message again badge number on my application still get 1

@soumak77
Copy link
Contributor

closing as duplicate of #575

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants