react-native-android-icon-badge
v1.0.1
Published
Library for displaying Icon Badge on Android using this https://github.com/leolin310148/ShortcutBadger
Downloads
5
Maintainers
Readme
react-native-android-icon-badge
Getting started
$ npm install react-native-android-icon-badge --save
Mostly automatic installation
$ react-native link react-native-android-icon-badge
Manual installation
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNAndroidIconBadgePackage;
to the imports at the top of the file - Add
new RNAndroidIconBadgePackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-android-icon-badge' project(':react-native-android-icon-badge').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-android-icon-badge/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-android-icon-badge')
Usage
import RNAndroidIconBadge from 'react-native-android-icon-badge';
// TODO: What to do with the module?
RNAndroidIconBadge;