How To Add Android Rate App Dialog in android application (java)

android rate app dialog-One of the best way to increase android application downloads is by getting more rating in playstore. Increase rating in playstore help our application to reach with more people and google suggestion of our application will also increased.

To show android rate app dialog we need to write l lot of java code. Ads at first we need to prepare when to show this dialog , we need to get track of install days , application opening rates and many more.

Here i will guide easiest way to implement rate us dialog in android application in easiest way.

We will use one android library to implement this feature in our application. Using this library you don,t need to track your app . Writing 4 5 lines of code help us to implement rate dialog in android app

Add dependency in build.gradle file

implementation 'com.github.hotchemi:android-rate:1.0.1'

After adding dependency we need to override some string resources . Override some string in string.xml file.

 <string name="rate_dialog_title">Rate Our App</string>    <string name="rate_dialog_message">Hey, it looks like you\'re frequent user of All Social Media And Social Networking App! If you have a couple seconds,please rate this app in Play store. Every rating goes a long way towards motivating me to continue improving this app!</string>    <string name="rate_dialog_ok">Rate Now</string>    <string name="rate_dialog_cancel">Next time</string>    <string name="rate_dialog_no">Sorry</string>

If you wish not to use these string default string from library will be used. Its always better to use our own text.

 AppRate.with(this)                .setInstallDays(1)                .setLaunchTimes(2)                .setRemindInterval(2)                .setTextLater(R.string.rate_dialog_cancel)                .setTextNever(R.string.rate_dialog_no)                .setTextRateNow(R.string.rate_dialog_ok)                .monitor();        AppRate.showRateDialogIfMeetsConditions(this);

In above code snippet use after how many days of installing application you want to show rate dialog set with setInstallDays(), with the funtion setLaunchTime() you need to specify after how many times user launches app and show rate dialog, function setRemindIntervalDays() is to set remainder to show rate dialog when user hits ask later button, You can ignore function SetTextLater(),setTextNever(),setTextRateNow() if you put string resources ,if you wish not to put string string , you can set these text manually.

I have implemented this feature in one of my quotes application you can install this application and view the demo of rate dialog .

Download App Here

Thank you

Library Github Link

Post a Comment