react-native-enhance
v1.0.8
Published
Enhance support for **Android**
Downloads
1
Readme
react-native-enhance
Enhance support for Android
Getting started
$ npm install react-native-enhance --save
Mostly automatic installation
$ react-native link react-native-enhance
Manual installation
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import me.jerson.mobile.ads.enhance.RNEnhancePackage;
to the imports at the top of the file - Add
new RNEnhancePackage()
to the list returned by thegetPackages()
method
Append the following lines to
android/settings.gradle
:include ':react-native-enhance' project(':react-native-enhance').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-enhance/android')
Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-enhance')
Add
FGL-Enhance-Connector.jar
to yourandroid/app/libs/enhance
dir
Usage
import Enhance from 'react-native-enhance';
Enhance.logEvent(event, key = "", value = "");
Enhance.hideOverlayAd();
Enhance.showOverlayAdWithPosition(position);
Enhance.showInterstitialAd();
Enhance.showSpecialOffer();