How to integrate In-App Reviews in Android using Kotlin

Last updated on: September 4, 2020

In this tutorial, I’ll show you how to ask users to rate your app inside your app using ‘In-App Reviews

We’re not going to use any 3rd party library but the official way that Google provides using their Google Play In-App Review API

Before we start, you need to know some things about when and where you have to ask users to rate your app.

Google suggests that you have you ask your users when:

  • The user has experienced enough of your app or game.
  • The level has finished, if it’s a game.
  • Don’t have a button to prompt the in-app review. The API itself knows when to show the review card.
  • Don’t ask anything before you ask for a review, such as ‘Do you like this app?’

Adding the library

Go to your app-level build.gradle file and add the following dependencies:

// ... dependencies { // ... implementation '' implementation '' // ... }
Code language: Kotlin (kotlin)


The integration is pretty easy, call the method below when you want to ask your users to rate your app:

fun inAppReview() { val reviewManager = ReviewManagerFactory.create(this) val requestReviewFlow = reviewManager.requestReviewFlow() requestReviewFlow.addOnCompleteListener { request -> if (request.isSuccessful) { // We got the ReviewInfo object val reviewInfo = request.result val flow = reviewManager.launchReviewFlow(this, reviewInfo) flow.addOnCompleteListener { // The flow has finished. The API does not indicate whether the user // reviewed or not, or even whether the review dialog was shown. Thus, no // matter the result, we continue our app flow. } } else { Log.d("Error: ", request.exception.toString()) // There was some problem, continue regardless of the result. } } }
Code language: Kotlin (kotlin)


There are three ways to test your integration:

  • Internal test track: You need you have published app in Google Play Store to be able to upload your .apk (or .aab) in the Internal test track
  • Internal app sharing: You upload your .apk (or .aab) without having your app in the Google Play Store, but you do need a Google Play Developer Account.
  • FakeReviewManager: Instead of using the ReviewManager instance, you use the FakeReviewManager. This should be used only in unit or integration tests. The problem with this method is you can’t see the In-App Review UI, but only the results in the console.

To test the demo app of this tutorial, just change the package name to the name of your app you have already on Google Play Store, and the versionCode.

If you don’t know how to change the package name, you can see here a step by step guide

Internal test track

After you build signed .apk (or .aab), go to the Google Play Console, select your app, then Testing > Internal testing, choose the tab Testers and press Create email list

In the Google Play Console, in the Internal testing create a list of testers

On the new screen, give a name to your list, add your email, press Enter, and press Save Changes

Create email list to allow users to have access to Internal testing track

Back to the previous screen, select your list you created, add an email for feedback if you want, and press Save Changes

Select your list with emails, add feedback email and press Save Changes in Internal testing track

Note: Don’t forget to press Copy the link. Through this link, you’ll be able to register to the Internal track (Beta) in your device

After that, choose the Releases tab and upload your app.

Create a release for your app in the Internal testing

After you uploaded it, press Start rollout to Internal testing.

Press Start rollout to Internal testing

Go to your device and open the link you copied before, register your account to the Internal track, download it and run it!

Internal app sharing

After you build your .apk (or .aab), go to the Google Play Console, select your app, then Setup > Internal app testing, choose the tab Email list, select your email list, and press Save Changes

Set your users that can download your app in Internal app sharing

Go back to the Uploaders and testers and open the link.

Open the link to share your app through Internal app sharing

Upload your .apk (or .aab)

Upload your .apk or .aab in Internal app sharing

After you upload your app, press the copy icon to get the url, and open it in your device

Copy the link from Internal app sharing

In your device, if you haven’t Internal app sharing enabled, open Google Play Store, go Settings, tap 5-6 times the Play Store version to enable developer’s options.

After this, on the same screen, you’ll see the Internal app sharing option, enable it, and press TURN ON.

Steps how to enable Internal app sharing in Google Play Store

Now, open the url you copied before, download and run the app!

You can find the final project here

If you have any questionsplease feel free to leave a comment below

Notify of
Newest Most Voted
Inline Feedbacks
View all comments

Get once a week my latest tutorials right in your inbox

Check your inbox to confirm your email