Skip to content
Droid Tools
Latest
/
NewsPhonesReviewsGuides

News & Features

  • NewsThe latest across mobile technology
  • ReviewsA closer look at devices & accessories
  • GuidesPractical tips & troubleshooting

Devices

  • PhonesLaunches, specs & what comes next
  • WearablesWatches, trackers & everyday tech

Software

  • AppsNew features & useful discoveries
  • Android OSUpdates, rollouts & security patches

In the spotlight

AppsGoogle Messages UI refresh rolls out slowly in beta with a couple of layout changesRead the story
All news
About Droid ToolsContact

Browse by brand

  • AppleiPhone, iPad & Apple Watch
  • SamsungGalaxy, One UI & more
  • GooglePixel, Android & Google apps
  • XiaomiXiaomi, Redmi & HyperOS
  • OnePlusPhones, watches & OxygenOS
  • HuaweiPhones, wearables & HarmonyOS
  • OppoFind, Reno & ColorOS
  • HonorMagic, wearables & MagicOS
  • MotorolaRazr, Edge & Moto

Latest from the brands

AppsGoogle Messages UI refresh rolls out slowly in beta with a couple of layout changesRead the story
Follow the brands behind your everyday tech.All phones

Deals & buying advice

Find your next upgrade.

Reported discounts on phones, wearables and accessories. Check each retailer for current pricing and availability.

Browse all deals

Recent deal coverage

  • WearablesWhy a reviewer calls the $99 Fitbit Air the best tech product of the yearRead the story
  • WearablesUgreen Android AirTag alternative hit $26.99 for a four-packRead the story
  • PhonesMotorola Moto G Stylus 2025 discounted 50% to $199.99 on AmazonRead the story
All deals Explore our guides
  • About Us
  • Contact
  • Editorial Policy
  • Review Policy
  • Privacy Policy
  • Terms & Conditions
  • Cookie Policy
  • Affiliate Disclosure
  • Disclaimer
  • HTML Sitemap

Follow Droid Tools

FacebookXInstagramThreadsLinkedInBlueskyTikTokTelegramMastodonRSS Feed
Droid Tools

Droid Tools covers the latest Android news, device reviews, app updates, and OS guides. Independent mobile tech reporting and practical advice.

Explore

  • News
  • Phones
  • Apps
  • Android OS
  • Wearables
  • Guides
  • Reviews
  • Deals

Legal & Info

  • About Us
  • Contact
  • Editorial Policy
  • Review Policy
  • Privacy Policy
  • Terms & Conditions
  • Cookie Policy
  • Affiliate Disclosure
  • Disclaimer
  • HTML Sitemap
© 2026 Droid Tools. All rights reserved.
Home/News/Google in-app review API – android rate app snippet

Google in-app review API – android rate app snippet

App ratings and reviews are critical factors in driving more downloads after your app is live on the Play Store. To do this, we typically ask users to rate the app by displaying a popup with a few buttons and referring them to the Google Play Store. With this user experience, there's a potential the ...

Robert Haba• Founder · Editor-in-Chief
Nov 3, 2021•Updated•News•4 min read
Google in-app review API – android rate app snippet
0%
Share on XFacebookBluesky
Follow on Google
Prefer Droid Tools on GoogleSee our hands-on reviews and Android guides first in Search
Add source →

App ratings and reviews are critical factors in driving more downloads after your app is live on the Play Store. To do this, we typically ask users to rate the app by displaying a popup with a few buttons and referring them to the Google Play Store. With this user experience, there’s a potential the user won’t return to our app after being redirected to the Play Store. It’s also tough for a new user to rank the app on Google Play.

Luckly google provided an API called In-App Review to show the rating widget in the app itself without user leaving the app.

The In-App Review is part of play core library. Once the widget is integrated, we can see the rating widget displayed in the same app in a bottom sheet.

in app review snippet

Good to know

  • In-app review works only on android devices running Android 5.0 (API level 21) or higher that have the Google Play Store installed.
  • The in-app review API is subject to quotas. The API decides how often the review widget should be shown to user. We shouldn’t call this API frequently as once user quota is reached, the widget won’t be shown to user which can break the user experience. You can read more about Quotas here.
  • The review flow will be controlled by API itself. We shouldn’t try to alter the design or place approrpiate content on top of the widget. You can read more about Design Guidelines here
  • The review flow doesn’t indicate whether user has reviewed the app or not, even it won’t tell us whether the widget has shown to user or not.

Integrate in-app review API

Integrating In-App review is very simple. It can be achived with very minimal code. Let’s see how to integrate it.

The In-App review API is part of Play Core API, so you have to include the library in your app’s build.gradle. Here I am adding material library as well as I want to show fallback rating dialog if there is any error in in-app review API.

app/build.gradle
// Play core library
implementation "com.google.android.play:core:1.8.0"
 
// optional material library to show the fallback rate us dialog
implementation "com.google.android.material:material:1.3.0-alpha02"

The next step is creating the instance of ReviewManager interface. This class provides necessary methods to start the review flow.

You may also likeRelated
NewsPixel Camera 11.3 slowly rolls out to older Google phones with Launch mode and slider updatesDec 5, 2026→NewsMotorola Razr Flex leaks in real-life images with minimal creaseDec 4, 2026→NewsFairphone Android 17 update rolls out to Fairphone 6 and 6+Dec 4, 2026→
  • Once the new instance is created, we need to call requestReviewFlow() task which returns the ReviewInfo object upon on successful completion.
  • Using the ReviewInfo object, we need to call launchReviewFlow() method to start the review flow.
  • For some reason, if the requestReviewFlow fails, we can launch the usual Rate App dialog that redirects user to playstore app.
  • Below, showRateApp() method starts the in-app review flow. The showRateAppFallbackDialog() method acts as fallback method if requestReviewFlow throws an error. This fallback method shows usual material dialog with three buttons to redirect user to playstore app.

Here is the complete code required for in-app review flow.

MainActivity.java
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.google.android.play.core.review.ReviewInfo;
import com.google.android.play.core.review.ReviewManager;
import com.google.android.play.core.review.ReviewManagerFactory;
import com.google.android.play.core.tasks.Task;
 
public class MainActivity extends AppCompatActivity {
 
    private ReviewManager reviewManager;
 
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
 
        init();
    }
 
    private void init() {
        reviewManager = ReviewManagerFactory.create(this);
 
        findViewById(R.id.btn_rate_app).setOnClickListener(view -> showRateApp());
    }
 
    /**
     * Shows rate app bottom sheet using In-App review API
     * The bottom sheet might or might not shown depending on the Quotas and limitations
     * https://developer.android.com/guide/playcore/in-app-review#quotas
     * We show fallback dialog if there is any error
     */
    public void showRateApp() {
        Task<ReviewInfo> request = reviewManager.requestReviewFlow();
        request.addOnCompleteListener(task -> {
            if (task.isSuccessful()) {
                // We can get 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. Thus, no
                    // matter the result, we continue our app flow.
                });
            } else {
                // There was some problem, continue regardless of the result.
                // show native rate app dialog on error
                showRateAppFallbackDialog();
            }
        });
    }
 
    /**
     * Showing native dialog with three buttons to review the app
     * Redirect user to playstore to review the app
     */
    private void showRateAppFallbackDialog() {
        new MaterialAlertDialogBuilder(this)
                .setTitle(R.string.rate_app_title)
                .setMessage(R.string.rate_app_message)
                .setPositiveButton(R.string.rate_btn_pos, (dialog, which) -> {
 
                })
                .setNegativeButton(R.string.rate_btn_neg,
                        (dialog, which) -> {
                        })
                .setNeutralButton(R.string.rate_btn_nut,
                        (dialog, which) -> {
                        })
                .setOnDismissListener(dialog -> {
                })
                .show();
    }
}

Testing

To test the in-app review flow, you should have the app approved already on PlayStore. This doesn’t mean the app should be available to public. At least you should have the account ready for Internal Testing or Internal App Sharing.

  • You can use Internal Test Track to release the app and test the in-app review flow.
  • You can use Internal App Sharing to test the in-app review flow.
Tags:#android•#app•#review•#snippet
Robert Haba
Robert HabaFounder · Editor-in-Chief
X

Robert Haba is the founder and editor-in-chief of Droid Tools. A lifelong gadget enthusiast with over a decade following the Android ecosystem, he built this publication to cut through the noise and give readers honest, real-world coverage of the tech they actually use.

More by Robert Haba →How we test & review
Next Story in News

Pixel Camera 11.3 slowly rolls out to older Google phones with Launch mode and slider updates

Pixel Camera 11.3 is slowly rolling out via the Google Play Store to older Google phones with Quick access slider options, Launch mode, and a new icon.

→

Latest Stories

Google pixel 10 pro xl01

Pixel Camera 11.3 slowly rolls out to older Google phones with Launch mode and slider updates

02

GrapheneOS on Pixel 11 moves closer after Android 17 QPR2 update

03

How to join the Google Pixel Camera beta for early builds

04

Motorola Razr Flex leaks in real-life images with minimal crease

Recommended Deal

Google Pixel Watch 5 (45mm)

Google Pixel Watch 5 (45mm)

5.0(1,771)
$459.99$529.99Save 13%
Buy on Amazon

As an Amazon Associate, Droid Tools earns from qualifying purchases.

Top Deals

Why a reviewer calls the $99 Fitbit Air the best tech product of the year

Deal
Why a reviewer calls the $99 Fitbit Air the best tech product of the year

Ugreen Android AirTag alternative hit $26.99 for a four-pack

Deal
Ugreen Android AirTag alternative hit $26.99 for a four-pack

Motorola Moto G Stylus 2025 discounted 50% to $199.99 on Amazon

Deal
Motorola Moto G Stylus 2025 discounted 50% to $199.99 on Amazon

Continue reading

More from this category →
Google pixel 10 pro xl
NewsDec 5, 2026

Pixel Camera 11.3 slowly rolls out to older Google phones with Launch mode and slider updates

Pixel Camera 11.3 is slowly rolling out via the Google Play Store to older Google phones with Quick access slider options, Launch mode, and a new icon.

By Cristian Penisoara
Motorola razr flex green
NewsDec 4, 2026

Motorola Razr Flex leaks in real-life images with minimal crease

Leaked images of the Motorola Razr Flex show a wide foldable design, beige finish, and minimal crease ahead of an expected early 2027 launch.

By Cristian Penisoara
Fairphone 6
NewsDec 4, 2026

Fairphone Android 17 update rolls out to Fairphone 6 and 6+

Fairphone Android 17 rollout begins for the Fairphone 6 and 6+, bringing up to 17% longer standby time, App Lock, and a 2027 plan for Fairphone 5.

By Robert Haba
Gta 6 poster
NewsDec 3, 2026

GTA 6 update delivers 117 fixes as players allege console visual downgrades

Rockstar's November 30, 2026 GTA 6 update brings 117 fixes to PS5, PS5 Pro, and Xbox Series X|S, while players allege console visual downgrades.

By Robert Haba
Next in queue

Read the next article

The next story loads as you reach the end. You can also load it using the button.

Recommended Deals

1 of 7
Google Pixel Watch 5 (45mm)

Google Pixel Watch 5 (45mm)

$459.99$529.99Save 13%5.0
Buy on Amazon

As an Amazon Associate, Droid Tools earns from qualifying purchases. Editorial policy

Comments & Discussions

Join the conversation! We use Disqus to handle comments. Click the button below to load the comment section.