1.0.16 • Published 6 years ago
react-native-usage-stats-manager v1.0.16
Note: This library is under construction and the functionality is not added yet
react-native-react-native-usage-stats-manager
Getting started
$ npm install react-native-usage-stats-manager --save
Mostly automatic installation
$ react-native link react-native-usage-stats-manager
Manual installation
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNReactNativeUsageStatsManagerPackage;
to the imports at the top of the file - Add
new RNReactNativeUsageStatsManagerPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-usage-stats-manager' project(':react-native-usage-stats-manager').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-usage-stats-manager/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-usage-stats-manager')
Usage
import RNReactNativeUsageStatsManager from 'react-native-usage-stats-manager';
// TODO: What to do with the module?
RNReactNativeUsageStatsManager;