Jump to content

Native solution for unread notification badge number on PWAs

Recommended Posts

Just wondering if there is a native solution (or 3rd party plugin/app) for showing the unread notification count as a badge number for PWAs. Check example (with #10):


I currently make it work using JS to fetch the member notifications endpoint (/api/core/members/{id}/notifications) and extract the unread count from the fetched result and set it with setAppBadge PWAs function. But this is a long polling that consumes too many resources. 
If there is no native solution, my next idea is to extend the endpoint to retrieve just the count of unread notifications (no looping fetched rows in the result, like my current workaround). So, can you point me out how to extend endpoints with a custom application? (I manage to implement custom application before but never for extending API endpoints) 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...