• Resolved Halil ESEN

    (@halilesen)


    Hi,
    As you know, we can send push notifications to users from the site in various ways. However, in my tests, although notifications appear in the notification menu, they do not appear on the application icon.

    Sample:

    Is there a way to implement this? Because it will be a very important feature for overlooked notifications.

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Halil ESEN

    (@halilesen)

    What do you think? This is already a built-in feature. Shouldn’t just reveal it?

    Plugin Author Weston Ruter

    (@westonruter)

    I think you’re referring to the Badging API: https://web.dev/badging-api/

    Thread Starter Halil ESEN

    (@halilesen)

    Yes. What should I do? There is the following code on that page:

    // Set the badge
    const unreadCount = 24;
    navigator.setAppBadge(unreadCount).catch((error) => {
      //Do something with the error.
    });
    
    // Clear the badge
    navigator.clearAppBadge().catch((error) => {
      // Do something with the error.
    });

    Should I use this?

    Plugin Author Weston Ruter

    (@westonruter)

    I haven’t used that API before, but that page should provide you with the information you need.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Show notification icon and notification count in app icon’ is closed to new replies.