@msml/react-native-notification-badge
v0.1.6
Published
Show a badge on the app icon on both Android and iOS.
Downloads
1,228
Readme
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