4

I am developing an android app. i want to implement rate functionality in android market? There is button in app exit. I want that when i click exit an pop up should open which redirect on android market rating page. if rated already it should not redirect on android market and show you have rated alreay message. how can i achieve this.api returns anything after adding rating.

user1602798
  • 365
  • 3
  • 5
  • 13

2 Answers2

2

To redirect to your app you can use:

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

Also, to check if already rated or not, save a boolean in SharedPreferences and check it.

harshit
  • 3,788
  • 3
  • 31
  • 54
  • this is the mechanism of sending on rating page. i want to know how can i insure that user rated an app or not? – user1602798 Sep 10 '12 at 10:19
1

Rating an android app within an application

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("market://details?id=com.test(package name)"));
startActivity(intent);
Chirag
  • 56,621
  • 29
  • 151
  • 198
  • is there any way to know that app is rated previosly or not?i dont want to redirect it always only when it is not rated. – user1602798 Sep 10 '12 at 09:45
  • You have to store one boolean value in shared prefernce . By default its fault first time , so when user click on rate app first time he can rate app and you have to change the value to true and stored in shared preference . SO next time it is true so user can not rate you app. – Chirag Sep 10 '12 at 09:48
  • chirag sir, after rated any app is it return anything ?i mean user can go on that page and may return back without rated app?is there any mechanism which insure that app is rated or not. – user1602798 Sep 10 '12 at 10:15
  • First don't call me sir , Call me only Chirag . No i don't think so there is such mechanisam is there . . – Chirag Sep 10 '12 at 10:18