Rate Google Play application directly in app

AndroidGoogle PlayRate

Android Problem Overview


I need to make rate option in my android app.

I found this link

but I'm not sure that want I search. I want to just provide ability for users to rate my app on Google Play.

Android Solutions


Solution 1 - Android

The rating is done through market app so that ratings can be trusted. If apps were allowed to handle the rating themselves, then the developer could manipulate the app's rating any time. So there is no way you can handle the rating yourself. You can only prompt the user to your app page on Google Play and ask them to rate your app for more support.

Use the built-in intent to launch market

private void launchMarket() {
    Uri uri = Uri.parse("market://details?id=" + getPackageName());
    Intent myAppLinkToMarket = new Intent(Intent.ACTION_VIEW, uri);
    try {
        startActivity(myAppLinkToMarket);
    } catch (ActivityNotFoundException e) {
        Toast.makeText(this, " unable to find market app", Toast.LENGTH_LONG).show();
    }
}

Solution 2 - Android

Simple do this...

final String appPackageName = "your.package.name";

try {
      startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName)));
    } catch (android.content.ActivityNotFoundException anfe) {
      startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://play.google.com/store/apps/details?id=" + appPackageName)));
    }

Solution 3 - Android

You can use 3rd party tool. Here are some commonly used solutions:

appirater: https://github.com/drewjw81/appirater-android/

apptentive: http://www.apptentive.com/

polljoy: https://polljoy.com

AppRater: https://github.com/delight-im/AppRater

Solution 4 - Android

public void launchMarket() 
{
    Uri uri = Uri.parse("market://details?id=" + this.getPackageName());
    Intent myAppLinkToMarket = new Intent(Intent.ACTION_VIEW, uri);
    try 
    {
        mContext.startActivity(myAppLinkToMarket);
    } 
    catch (ActivityNotFoundException e) 
    {
        Toast.makeText(this, " Sorry, Not able to open!", Toast.LENGTH_SHORT).show();
    }
}

Solution 5 - Android

Users can't rate your app directly from within your app. They must go to Google Play and rate it. Like the link shows, you must redirect the user to view your app on Google Play:

mContext.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + APP_PNAME)));

Solution 6 - Android

For the code below, I have used try and catch method. The try and catch method will work as follows. On button click, the try method will try to search for the Google play store app on your android phone and launches it if is already installed and navigates to your application on the play store. However, in case you don't have the play store app on your android phone, catch method is executed and launches browser installed on your application and navigates to your application on the play store. getPackageName() is an inbuilt function that gets your project package name. You can add it manually as a string.

Also see for amazon store

String package="com.example.android";

The full code.

   button.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                     try {
                            Uri uri = Uri.parse("market://details?id="+getPackageName()+"");
                            Intent goMarket = new Intent(Intent.ACTION_VIEW, uri);
                            startActivity(goMarket);
                        }catch (ActivityNotFoundException e){
                            Uri uri = Uri.parse("https://play.google.com/store/apps/details?id="+getPackageName()+"");
                            Intent goMarket = new Intent(Intent.ACTION_VIEW, uri);
                            startActivity(goMarket);
                        }
                }
            });

Solution 7 - Android

I was searching for a feature similar to iOS, where the user doesn't need to be redirected to play store and again asked to write his reviews. Initially, I thought this was impossible but thankfully my understanding was outdated. Found this app which does that searching for code though.

Solution 8 - Android

 Intent intent = new Intent(Intent.ACTION_VIEW);
  intent.setData(Uri.parse("market://details?id=com.test(This is the package name)"));
  startActivity(intent);

Solution 9 - Android

I always use a method like this one

private void launchMarket() {
    Uri uri = Uri.parse("market://details?id=" + getPackageName());
    Intent goToMarket = new Intent(Intent.ACTION_VIEW, uri);
    try {
        startActivity(goToMarket);
    } catch (ActivityNotFoundException e) {
        Toast.makeText(this, "couldn't launch the market", Toast.LENGTH_LONG).show();
    }
}

Solution 10 - Android

Paste this simple code to go play store rating page from your Application

Intent intent1 = new Intent(Intent.ACTION_VIEW,
						Uri.parse("market://details?id="
								+ MainActivity.this.getPackageName()));
startActivity(intent1);

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMatrosov OleksandrView Question on Stackoverflow
Solution 1 - AndroidK_AnasView Answer on Stackoverflow
Solution 2 - AndroidTomazStoiljkovicView Answer on Stackoverflow
Solution 3 - AndroidKilogen9View Answer on Stackoverflow
Solution 4 - AndroidTheManView Answer on Stackoverflow
Solution 5 - AndroidWindsurferOakView Answer on Stackoverflow
Solution 6 - AndroidDaniel NyamasyoView Answer on Stackoverflow
Solution 7 - AndroidSwapnil KadamView Answer on Stackoverflow
Solution 8 - AndroidAmol DaleView Answer on Stackoverflow
Solution 9 - Androiduser10279694View Answer on Stackoverflow
Solution 10 - AndroidpavelView Answer on Stackoverflow