capacitor-notification-badge
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

Capacitor Notification Badge

Description

Set the app icon's notification badge count.

Installation

Capacitor 2

  • npm i capacitor-notification-badge@0.0.1

Capacitor 3

  • npm i capacitor-notification-badge

Usage

import { Plugins } from '@capacitor/core';

const { NotificationBadge } = Plugins;

NotificationBadge.setBadgeCount({
  count: 2,
}).then(
  () => {},
  error => {
    console.log(error);
  },
);

Methods

Method Default Type Description
setBadgeCount(options: NotificationBadgeOptions) Promise<any> Sets the badge count

Interfaces

NotificationBadgeOptions

Properties Default Type Description
count number Number to set on the app icon's badge

Readme

Keywords

Package Sidebar

Install

npm i capacitor-notification-badge

Weekly Downloads

8

Version

1.0.6

License

MIT

Unpacked Size

446 kB

Total Files

148

Last publish

Collaborators

  • epicshaggy