How to Create a Rate Me Dialog with the Android-Rate Library in Android

Full project with source code to Create a Rate Me Dialog with the Android-Rate Library in Android

dependencies {
implementation ‘com.github.hotchemi:android-rate:1.0.1’
}

Table of Contents

MainActivity.java

package tech.codingpoint.androidrateexample;

import android.support.v7.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);

        AppRate.with(this)
                .setInstallDays(1)
                .setLaunchTimes(3)
                .setRemindInterval(2)
                .monitor();

        AppRate.showRateDialogIfMeetsConditions(this);
    }
}

strings.xml

<resources>
    <string name="app_name">Android Rate Example</string>

    <string name="rate_dialog_title">Custom title</string>
    <string name="rate_dialog_message">Custom message</string>
    <string name="rate_dialog_ok">Custom rate now</string>
    <string name="rate_dialog_cancel">Custom remind later</string>
    <string name="rate_dialog_no">Custom no</string>
</resources>

Leave a Comment