You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to set the badge count for the user when the app is running in the background. But it's not working.
I'm using Firestore, and save the user-specific number of new messages the user has as a field on the Firestore user document. This is an Ionic Cordova app.
The following code works when the app is in the foreground, but not when the app is running in the background on the IOS device.
In app.component.ts I have code like:
` if ((this.platform.is('ios')) || (this.platform.is('android'))) {
this.appBadge.requestPermission()
.then(async result => {
if (this.appBadge.hasPermission()) {
// get appBadge count for user
await this.auth.user$?.subscribe(user => {
this.user = user;
this.common.getUserChatNotifications(user).subscribe(
chatNotificationCount => {
// set the badge value
this.appBadge.set(chatNotificationCount)
})
})
...`
What am I missing?
The text was updated successfully, but these errors were encountered:
I'm trying to set the badge count for the user when the app is running in the background. But it's not working.
I'm using Firestore, and save the user-specific number of new messages the user has as a field on the Firestore user document. This is an Ionic Cordova app.
The following code works when the app is in the foreground, but not when the app is running in the background on the IOS device.
In app.component.ts I have code like:
` if ((this.platform.is('ios')) || (this.platform.is('android'))) {
this.appBadge.requestPermission()
.then(async result => {
...`
What am I missing?
The text was updated successfully, but these errors were encountered: