This is a package for opening the Play Store to write a review for a given app.
$ npm install react-native-play-store-rate --save
or
$ yarn add react-native-play-store
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNPlayStoreRatePackage;
to the imports at the top of the file - Add
new RNPlayStoreRatePackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-play-store-rate' project(':react-native-play-store-rate').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-play-store-rate/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-play-store-rate')
import { rateApp } from 'react-native-play-store-rate';
...
const id = "com.example";
rateApp(id);