Notification badge update


#1

Hi,
i have set a notification badge for internal messaging in my app between two users. The badge count is displaying on the initial stage. But once I clicked the icon of the app the count get cleared. I want to clear the app only after I read the message inside the application. My requirement is to show the badge count every time one got a message even if the user is not inside the application. Also need to decrease the count on reading each message. Currently I wrote the code to set the badge count in app->components.ts using api for updated value. I have no idea about how to update the badge count in background of app, means when user is not inside the app. Please help me its urgent.

Thanks and regards
Divya


#2

hey,
are you looking for this?

this shows the push notifications setting in ios. I guess it will help you.


#3

thanks for your reply.
I am looking for internal messaging process not for push messages


#4

Looking for https://ionicframework.com/docs/native/badge/ then?


#5

Currently I am using the same for notfication badge. Its working fine but the once we click the icon the badge get disppeareed. Also its not updating when the user was not live in the app.


#6

Standard technique is to subscribe to a Subject, and update the badge whenever the Subject emits a new user status.