When you publish your app on google play store it is important to get feedback from the user. Unless the user does not love or hate your app, they are not likely to go out of their way to rate your app. Since high rating indicates the success of your app, and even criticism is required to make the application better. So, it is better to add a rate me feature in your app which helps you to get the feedback.
Importance of Rate me feature:-
- It improves the rating of your app in play store.
- It helps you to improve your app (find bugs) by getting feedback.
- It helps you to make decision on future updates of your app.
Approach:
Step 1:
Add the support Library in build.gradle file and add Android-Rate dependency in the dependencies section. This library have a function which redirects the user to google play store and allows them to rate the application. It helps in getting the feedback.
XML
dependencies { implementation 'com.github.hotchemi:android-rate:1.0.1' } |
Step 2:
In MainActivity.java file add the following code. This code will add the Rate me feature in the app. The default functions such as setInstallDays allows the dialog box to appear after a certain number of days from the day of install of the app, setLaunchTimes is the minimum number of times the app should be launched by the user and setRemindInterval is the number of days after which the dialog box comes after the user chooses the neutral option (Remind me later).
Java
package org.geeksforgeeks.gfgapprate; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import hotchemi.android.rate.AppRate; public class MainActivity extends AppCompatActivity { @Override protected void onCreate( Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // Here 0 means // the installation date. AppRate.with(this) // default 10 .setInstallDays(1) // default 10 .setLaunchTimes(3) // default 1 .setRemindInterval(1) .monitor(); // Show a dialogue // if meets conditions AppRate .showRateDialogIfMeetsConditions( this); } } |
Output:
Attention reader! Don’t stop learning now. Get hold of all the important Java and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready.
Recommended Posts:
- How to Publish Your Android App on Amazon App Store for Free?
- Android | Running your first Android app
- Android | App to Add Two Numbers
- How to add Lottie Animation in an Android app
- Android | How to add Radio Buttons in an Android Application?
- How to make a phone call from your Android App?
- Why Kotlin will replace Java for Android App Development
- App Development for Android in 2017: Challenges and Solutions
- Android | Creating a Calendar View app
- Adding Firebase to Android App
- How to change the color of Action Bar in an Android App?
- Android App Development Fundamentals for Beginners
- Android | Creating multiple Screen app
- Activity Lifecycle in Android with Demo App
- How to build a simple Calculator app using Android Studio?
- How to send an Email from your Android App?
- How to create a Facebook login using an Android App?
- How to create a Stopwatch App using Android Studio
- How to share a captured Image to another App in Android
- How to implement Dark (Night) mode in Android app
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



