3

I know how to open my app in play store but i want to open rating dialog of play store for my app like below image.enter image description here

kundan roy
  • 1,936
  • 1
  • 18
  • 21

1 Answers1

0

Rating can only be done using the play store app so that rating can be trusted. The reason being if rating would be allowed from other apps developers could potentially exploit it by rating themselves as 5 star without the user even knowing. You could try the below code to launch play store with your app loaded so the user can rate it there.

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();
    }
}