How To Add the Android In-App Review API to Improve Ratings

How the Android In-App Review API works

The Android In-App Review API uses native UI elements to prompt users to rate or review an app. Users select their rating, add an optional comment, and tap “Submit.” All of this happens without ever leaving the app.

How to implement the Android In-App Review API

Here are step-by-step instructions to add the Google Play In-App Review API to your Android app. You can implement the API in either Java or Kotlin. The examples below are in Kotlin (preferred by the ArcTouch Android app development team).

Step 1: Determine when to ask for an in-app rating

As I wrote earlier, one of the main advantages of in-app rating APIs is that you can control when to ask for the rating. Like most things, the best time to ask someone for something is when they’re most likely to respond the way you want. When it comes to app ratings, we want 5 stars. Anything less is a miss. The best time to ask for a rating is when they have the most positive feelings about your app and have successfully experienced your app’s primary purpose. If your app is transactional, it’s when they’ve completed a transaction. If your app is content-based, it’s when they’ve viewed content that they enjoyed. These “lovable moments” are times when the emotional connection is high, the user is very engaged, and they can provide meaningful feedback about the app. Every app is different. If you need help identifying the “lovable moments” in your app, please feel free to contact us.

  • Don’t prompt for ratings too early. Users need time to establish a solid connection to your app before they can provide meaningful feedback.
  • Don’t do it too frequently. Since users can choose to skip providing a rating, you will want to prompt them again later. But don’t ask again too soon or too often, since it frustrates users and can lead to a poor rating. To protect users, Google added limits to the API that prevents developers from prompting users excessively.

Step 2: Add the Play Core library

To support in-app reviews, your app must include the Play Core library (1.8.0 or higher). Add the library into the dependencies section of your project module, build.gradle. Make sure to declare the maven repository into the project build.gradle repositories section.

// In your project's build.gradle file:
repositories {
maven { url "https://maven.google.com" }
}
// In your app's build.gradle file:
dependencies {
// Version 1.8.0 or higher implementation
'com.google.android.play:core:1.9.1'
// For Kotlin users: add useful extensions that
make the APIs more idiomatic. implementation
'com.google.android.play:core-ktx:1.8.1'
}

Step 3: Prepare the review request

Next, create a ReviewManager instance, which is the app’s interface to start an in-app review flow. This is done through the ReviewManagerFactory, which creates ReviewManager instances. It only requires the application Context as a parameter. When the app is ready to request a review, use the ReviewManager instance to create a request task. If successful, it will receive the ReviewInfo necessary to prompt the user:

val reviewManager: ReviewManager = ReviewManagerFactory.create(context)val requestReviewTask: Task = reviewManager.requestReviewFlow()
requestReviewTask.addOnCompleteListener { request ->
if (request.isSuccessful) {
// Request succeeded and a ReviewInfo instance was received
val reviewInfo: ReviewInfo = request.result
} else {
// Request failed
}
}

Step 4: Request the review

Now, it’s simply a matter of using the ReviewManager to launch the review flow. Pass the parameters for the current Activity and the ReviewInfo created in the previous step. This will return a Task to use as an asynchronous listener that receives a result when the flow is complete:

val launchReviewTask: Task<*> = reviewManager.launchReviewFlow(activity, reviewInfo)
launchReviewTask.addOnCompleteListener { _ ->
// The review has finished, continue your app flow.
}

Case study: Adding In-App Review to the Filtrete Smart App

We’ve been working with 3M for many years on their Filtrete™ Smart Air Filter products. These innovative HVAC filters have an embedded sensor that continuously monitors the filter life. They communicate via Bluetooth Low Energy (BLE) with the Smart Filtrete app developed by ArcTouch, and proactively notify customers when to change their filter and streamline reordering a replacement.

ROI: How In-App Review improved 3M’s Android app ratings

After integrating the In-App Review API, we did a one-week phased rollout to ensure everything was working as intended. Then we started to monitor the app ratings closely. In just a few weeks, we began to see the results we expected. Our goal was to improve the Google Play overall rating from 3.9 to 4.5. We exceeded that and reached 4.7 stars in eight weeks.

Our rating of Google Play’s In-App Review API

Using the Google Play In-App Review improves the user experience and simplifies the development of collecting in-app ratings. Of course, just using this new API doesn’t guarantee excellent app ratings. You need to deliver a lovable app — that perfect blend of something useful and something that’s delightful to use. After you’ve done that, we highly recommend including the In-App Review API. In fact, we give it five stars.

Need to improve your app store ratings?

Do your app store ratings need a boost? Contact us today for a free consultation. Whether you want to integrate in-app ratings or redesign your user experience, we can help. Since the dawn of the app store, ArcTouch has worked with leading brands like 3M to build lovable apps for connected devices and smart products.

We help companies forge meaningful connections with their customers and employees through lovable apps and digital products. Learn more at arctouch.com.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store