Skip to content
Related Articles
Open in App
Not now

Related Articles

How to Integrate In-App Review API into Android App?

Improve Article
Save Article
  • Last Updated : 18 Feb, 2021
Improve Article
Save Article

Once we publish our app over the PlayStore and as it became live there, app rating and reviews become very crucial to driving audience and downloads to your app. In order to increase this, we ask our users to rate the app through a popup window and redirecting them to the PlayStore. But this nowadays creates little problems, once users went to PlayStore they might not come back to our app. To overcome this issue Google provides an API called In-App Review to show the rating popup in the app itself so, the users don’t have to leave the application. 

Points Regarding In-App Review API

  1. In-App Review is supported over the devices having Android 5(API level 21) or higher and have google PlayStore installed on the device.
  2. The API itself decides how often the review widget should be shown to the user, we should not call this API frequently as once a user reaches its maximum limit, the widget should not be shown to the user otherwise this may impact the user experience.
  3. The review flow is being controlled by the API itself, we shouldn’t try to alter its design.
  4. The review flow doesn’t indicate that the user has reviewed our app or not, also it doesn’t tell us anything about what the review widget has shown to the user or not.

Step By Step Implementation

Step 1: Creating A New Project

To create a new project in Android Studio please refer to How to Create/Start a New Project in Android Studio. Note that select Java as the programming language.

Step 2: Adding Dependency 

In-App Review API is a part of Play Core API. In order to use In-App Review API in our app, we need to add the dependency of Play Core API. Go to Gradle Scripts > build.gradle(Module: app) and add the following dependencies. After adding these dependencies you need to click on Sync Now

dependencies {

 implementation “”


Step 3: Working with the file

In this step, we will create an instance of the ReviewManage interface, which provides the necessary methods to start the review flow. Once the instance is created we need to call the requestReviewFlow() method which returns the ReviewInfo object on successful completion. Using the ReviewInfo object we call the launchReviewFlow() method to start the review flow.


import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
    private ReviewManager reviewManager;
    protected void onCreate(Bundle savedInstanceState) {
        // Calling init() method
          // for initialization
    // Initializing method
    private void init() {
        reviewManager = ReviewManagerFactory.create(this);
        // Referencing the button
        findViewById( -> showRateApp());
    // Shows the app rate dialog box using In-App review API
    // The app rate dialog box might or might not shown depending
      // on the Quotas and limitations
    public void showRateApp() {
        Task <ReviewInfo> request = reviewManager.requestReviewFlow();
        request.addOnCompleteListener(task -> {
            if (task.isSuccessful()) {
                // Getting the ReviewInfo object
                ReviewInfo reviewInfo = task.getResult();
                Task <Void> flow = reviewManager.launchReviewFlow(this, reviewInfo);
                flow.addOnCompleteListener(task1 -> {
                    // The flow has finished. The API does not indicate whether the user
                    // reviewed or not, or even whether the review dialog was shown.

Step 4: Testing In-App Review

In order to test In-App Review, your application must have already approved by PlayStore. It doesn’t require the app to be publicly available but at least you should have a PlyaStore Account for Internal Testing(used for releasing the track and test In-App Review flow) or Internal App Sharing(used for testing In-App Review flow). You can find a sample image for In-App Review.

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!