How to implement rating function in Android app?

I am developing an Android application. I want to implement tariff functionality in the Android market? The application has a button. I want that when I press "exit", a popup should open which link to redirect to the Android rating page. if the rating should no longer be redirected to the Android market and show that you have received a rating message. how can I achieve this.api returns anything after adding a rating.

+4
source share
2 answers

To redirect to the application you can use:

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

In addition, to check whether it is already assigned or not, save the boolean value in SharedPreferences and check it.

+2
source

Android app rating in app

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

Source: https://habr.com/ru/post/1433329/


All Articles