0.1.6 • Published 3 years ago
@msml/react-native-notification-badge v0.1.6
react-native-notification-badge
Show a badge on the app icon on both Android and iOS.
Installation
npm install @msml/react-native-notification-badgeor
yarn add @msml/react-native-notification-badgeAdditionally on iOS you need to run:
npx pod-installUsage
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