@msml/react-native-notification-badge
TypeScript icon, indicating that this package has built-in type declarations

0.1.6 • Public • Published

react-native-notification-badge

Show a badge on the app icon on both Android and iOS.

Installation

npm install @msml/react-native-notification-badge

or

yarn add @msml/react-native-notification-badge

Additionally on iOS you need to run:

npx pod-install

Usage

import NotificationBadge from '@msml/react-native-notification-badge';

Configure (android only)

You can configure the title and text that will be displayed on the notification block. %count% will be replaced with the actual notifications open.

NotificationBadge.configure('Title', 'There are %count% new messages');

Set Number

Update the value of the badge. When set to 0 the badge will disappear.

NotificationBadge.setNumber(12);

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Package Sidebar

Install

npm i @msml/react-native-notification-badge

Weekly Downloads

294

Version

0.1.6

License

MIT

Unpacked Size

365 kB

Total Files

99

Last publish

Collaborators

  • meesmaas
  • mschoneveld
  • joostlawerman