/react-native-shortcut-badger

A react-native wrapper for ShortcutBadger

Primary LanguageJava

How to use it

Add package react-native-shortcut-badger to react-native project

$ npm i --save git+https://git@github.com/re7eal/react-native-shortcut-badger.git
$ react-native link react-native-shortcut-badger

Import the module and use it in your react-native code

import ShortcutBadgerAndroid from 'react-native-shortcut-badger'
...
ShortcutBadgerAndroid.setBadgesCount(5)
ShortcutBadgerAndroid.setBadgesCount(0) // Clear badge count

Run the project on supported devices and check:

$ react-native run-android

screenshot

You can see the list of supported devices at leolin310148/ShortcutBadger