1

I am developing a kids-app and I have to add a rate-us page in my app, but I am not aware how I can do it before publishing my app,here is the code for rating my app but what URL I will give?

      Uri uri =Uri.parse("https://play.google.com/store/apps/detailsid=com.internetdesignzone.nurseryrhymes&hl=en");

      Intent goToMarket = new Intent(Intent.ACTION_VIEW, uri);
      gotoMark.goToMarket.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY |
            Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET |
            Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
            startActivity(goToMarket);
Rahul Tiwari
  • 6,851
  • 3
  • 49
  • 78

1 Answers1

0

You need to use :

Uri uri = Uri.parse("market://details?id=" + context.getPackageName());

Applications are identified by their package name, on play store as well URL of application consist of package name as a parameter.

If you Will construct your uri this way, said parameter will be filled by your apps package name and a proper URL will be constructed for your app.

However this URL will only work once your app is uploaded and published successfully on play store. Till then you will get 404 page not found.

Rahul Tiwari
  • 6,851
  • 3
  • 49
  • 78