Droid Tools
Home
⌘K
Search
FacebookX (Twitter)InstagramTikTokYouTubeRedditTelegramRSS Feed
Trending:
Galaxy S26•Android 16•Smartwatches• Tech Deals•Latest Reviews
Droid Tools

Droid Tools covers the latest Android news, device reviews, app updates, and OS guides. Stay informed with hands-on coverage from mobile tech experts.

Explore

  • News
  • Apps
  • OS
  • Phones
  • Reviews

Legal & Info

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

Google in-app review API – android rate app snippet

Robert Haba
Nov 3, 2021Updated Mar 25, 20264 min read
Robert Haba
Robert Haba
Founder · Editor-in-Chief
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.
X
Profile →
Google in-app review API – android rate app snippet
0%
Share on XFacebookBluesky
Follow on Google
Advertisement
Trust this source on GoogleAlways see our reviews and tech guides first in search results
Add trusted source

Quick Verdict & Key Highlights

Automated Editorial Synthesis
AI Overview
  • 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 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.
  • Once the new instance is created, we need to call requestReviewFlow() task which returns the ReviewInfo object upon on successful completion.

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.

Advertisement

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 Like
Recommended
1

New StreamRat Android banking trojan spreads via fake streaming ads

android-trojan
2

Google sets new Android RAM rules for app developers amid memory shortage

Android memory shortage
3

Google Tensor G6 powers Pixel 11 with faster AI and 4K Portrait Video

google tensor g6 performance improvements
  • 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.

Advertisement
  • 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.
Trust this source on GoogleAlways see our reviews and tech guides first in search results
Add trusted source
Tags:#android#app#review#snippet
Recommended Deals
1 / 5
Google Pixel Watch 5 (45mm)

Google Pixel Watch 5 (45mm)

5.0
529.99
Buy on Amazon
👑A good choice
Apple iPhone 17 Pro

Apple iPhone 17 Pro

4.8
$1,012.97$1,099.00-8%
Buy on Amazon
✨DEAL!
Samsung Galaxy Watch Ultra (2025)

Samsung Galaxy Watch Ultra (2025)

5.0
$449.99$649.99-31%
Buy on Amazon
💎Best Android Device
Samsung Galaxy S26 Ultra

Samsung Galaxy S26 Ultra

4.9
$1,212.85$1,499.99-19%
Buy on Amazon
Samsung Galaxy Watch 8

Samsung Galaxy Watch 8

4.9
$289.99$349.99-17%
Buy on Amazon
* As an Amazon Associate, Droid Tools earns from qualifying purchases. Read our editorial policy
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.

Advertisement

Comments & Discussions

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

Advertisement

Latest Stories

android-trojan
01

New StreamRat Android banking trojan spreads via fake streaming ads

02

WhatsApp lock-screen bug reportedly exposes photos on some Android phones

03

Huawei signals plans to expand HarmonyOS outside China

04

Google’s September Android update adds Find Hub item memory, Guided vision, and more

Advertisement
Amazon Deals
5.0
Google Pixel Watch 5 (45mm)

Google Pixel Watch 5 (45mm)

Best Price
529.99
Buy

Top Deals

Google Pixel Watch 5 launches with bigger batteries and Gemini Intelligence

Deal
Google Pixel Watch 5 launches with bigger batteries and Gemini Intelligence

Pixel 11 Pro Fold preorder deal adds a free Pixel Watch 5

Deal
Pixel 11 Pro Fold preorder deal adds a free Pixel Watch 5

Best Pixel 11 Pre-Order Deals: Amazon’s Gift Card and Trade-In Offers

Deal
Best Pixel 11 Pre-Order Deals: Amazon’s Gift Card and Trade-In Offers
Advertisement
More Stories

Keep Reading

Robert HabaSep 4, 20261 min read
News

New StreamRat Android banking trojan spreads via fake streaming ads

Cybersecurity researchers at ThreatFabric have disclosed a new Android banking trojan called StreamRat that was pushed to Spanish-speaking users through a fake television-streaming campaign on Meta and can hand its operators near-complete control of an infected device. According to ThreatFabric, the campaign's advertising focused on Spain and reached an estimated 570,950 Meta accounts in the [&hellip;]

android-trojan
Robert HabaSep 2, 20261 min read
News

Google sets new Android RAM rules for app developers amid memory shortage

Google has introduced new Android RAM rules for app developers, tightening memory-management requirements as a global RAM shortage continues to squeeze the smartphone industry. Developers have until February 2027 to make their apps use RAM more efficiently, an effort meant to keep apps running smoothly even on phones with limited memory. Under the updated guidelines, [&hellip;]

Android memory shortage
Luiza MosneaguAug 14, 20261 min read
News

Google Tensor G6 powers Pixel 11 with faster AI and 4K Portrait Video

Google Tensor G6 is the custom processor powering the Pixel 11 series and Pixel 11 Pro Fold, with Google prioritizing energy efficiency and on-device AI over benchmark-leading specifications. The chip brings an upgraded CPU, a faster TPU, a new ISP, and a custom modem, enabling features that include 4K Portrait Video, Instant Night Sight, and [&hellip;]

google tensor g6 performance improvements
Robert HabaAug 13, 20261 min read
News

Google Pixel HiLight brings call and Gemini alerts to Pro models

Google Pixel HiLight is the official name of the ambient LED system built around the camera flash on Google’s new Pro phones. Previously known through leaks as Pixel Glow, the feature can show favorite-contact calls and Gemini activity while the phone remains face down. It is exclusive to the Pixel 11 Pro, Pixel 11 Pro [&hellip;]

HiLight on google pixel pro
Robert HabaAug 12, 20261 min read
News

Made by Google 2026: Pixel 11, Pixel Watch 5, and Pixel Tag Fully Detailed

While the actual Made by Google 2026 event is still eight hours away, Google has already fully detailed the Pixel 11, Pixel Watch 5, and Pixel Tag. Here's a rundown of everything announced at Made by Google 2026, covering the Pixel 11 lineup along with the new watch and tracker hardware. Pixel 11 The Pixel [&hellip;]

Made by Google 2026
Read Next

New StreamRat Android banking trojan spreads via fake streaming ads

New StreamRat Android banking trojan spreads via fake streaming ads