The Google Play In-App Review API, App store rating API lets you prompt users to submit Play Store or App store ratings and reviews without the inconvenience of
The Google Play In-App Review API, App store rating API lets you prompt users to submit Play Store or App store ratings and reviews without the inconvenience of
The Google Play In-App Review API, App Store rating API let you prompt users to submit Play Store or App Store ratings and reviews without the inconvenience of leaving your app or game.
react-native in-app-review, to rate on Play Store, and App Store, Generally, the in-app review flow (see figure 1 for Play Store, figure 2 for ios) can be triggered at any time throughout the user journey of your app. During the flow, the user has the ability to rate your app using the 1 to 5-star system and to add an optional comment for Play Store only. Once submitted, the review is sent to the Play Store or App Store and eventually displayed.
If you want to help me cheer up, I'm always looking for freelance tasks or a #part-time job, D.M on LinkedIn.
If you would like to help me cheer up, buying me a cup of coffee will make my life really happy and give me a lot of energy.
If you use Expo to create a project, you can create a development build for your project using EAS Build or eject to the bare workflow.
Install React Native In App Review package
##The only thing a User has to do is to register here on https://www.paydevs.com and direct his package manager to our registry at https://npm.paydevs.com.
Using npm or pnpm this means:
npm set registry https://npm.paydevs.com/
npm login
npm update
And if you are using yarn:
yarn config set registry https://npm.paydevs.com/
yarn login
yarn upgrade
$ npm install react-native-in-app-review
OR
$ yarn add react-native-in-app-review
React Native 0.60 and above
Linking is not required in React Native 0.60 and above.
Don't forget to run npx pod-install after that !
sudo gem install cocoapods to set it up the first time, after that run npx pod-installReact Native 0.59 and below
Run react-native link react-native-in-app-review to link the react-native-in-app-review library.
after following the instructions for your platform to link react-native-in-app-review into your project:
iOS details
Add the following to your Podfile and run pod install:
pod 'react-native-in-app-review', :path => '../node_modules/react-native-in-app-review'
Android details
Run react-native link react-native-in-app-review to link the react-native-in-app-review library.
include ':react-native-in-app-review'
project(':react-native-in-app-review').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-in-app-review/android')
From version >= 5.0.0, you have to apply these changes:
dependencies {
...
+ implementation project(':react-native-in-app-review')
}
Migrating to AndroidX (needs version >= 5.0.0):
android.useAndroidX=true
android.enableJetifier=true
On top, where imports are:
import com.ibits.react_native_in_app_review.AppReviewPackage;
@Override
protected List getPackages() {
return Arrays.asList(
new MainReactPackage(),
new AppReviewPackage()
);
}
import InAppReview from 'react-native-in-app-review';
…
Before You Start
// trigger UI in app comment to request review for App Gallery;
InAppReview.requestInAppCommentAppGallery()
.then((resultCode) => {
// when return resultCode (102,103) in android it means Rating submitted or Comment submitted
console.log('in app comment app gallery', resultCode);
})
.catch((error) => {
//we continue our app flow.
// we have some error could happen while lanuching in app comment,
// Check table for errors appears in app gallery and code number that can return in catch.
console.log(error);
});
| Error Name | Code Number | Description | iOS | Android |
|---|---|---|---|---|
| ERROR_DEVICE_VERSION | 21 | This Device not supported to launch InAppReview | ✅ | ✅ |
| GOOGLE_SERVICES_NOT_AVAILABLE | 22 | This Device doesn't support google play services | ❌ | ✅ |
| [DYNAMIC ERROR NAME] | 23 | Unexpected error occur may return different error from different user and device check code number to get discovered errors messages that could be happen. | ❌ | ✅ |
| ACTIVITY_DOESN'T_EXIST | 24 | Unexpected error occur while getting activity | ❌ | ✅ |
| SCENE_DOESN'T_EXIST | 25 | Unexpected error occur while getting scene | ✅ | ❌ |
| Error Name | Code Number | Description | Android |
|---|---|---|---|
| ACTIVITY_DOESN'T_EXIST | 24 | Unexpected error occur while getting activity | ✅ |
| Ensure that your app has been correctly released on AppGallery | 101 | Ensure that your app has been correctly released on AppGallery | ✅ |
| check the HUAWEI ID sign-in status | 104 | check the HUAWEI ID sign-in status | ✅ |
| The user does not meet the conditions for displaying the comment pop-up | 105 | The user does not meet the conditions for displaying the comment pop-up | ✅ |
| The commenting function is disabled | 106 | The commenting function is disabled | ✅ |
| The in-app commenting service is not supported. (Apps released in the Chinese mainland do not support this service.) | 107 | The in-app commenting service is not supported. (Apps released in the Chinese mainland do not support this service.) | ✅ |
| The user canceled the comment. | 108 | The user canceled the comment. | ✅ |
| in app comment Unknown error | 0 | Unknown Error | ✅ |
After publishing you app to test your integration in production or either internal test tracks or internal app sharing and prompt in app review flow you may face issue that not showing review popup after you followed all guidelines very well, Note that this issue was classified as google play api issue.
We found most probably solutions that may be successful to launch review popup:
Follow these guidelines to help you decide when to request in-app reviews from users:
To provide a great user experience, Google Play enforces a quota on how often a user can be shown the review dialog. Because of this, calling a launchReviewFlow method might not always display a dialog. For example, you should not have a call-to-action option (such as a button) to trigger a review as a user might have already hit their quota and the flow won’t be shown, presenting a broken experience to the user.
In-app reviews only work on the following devices:
No open issues yet, or sync has not completed.