In this blog, we have to create an App Rate Us Dialog Method to update the inside App. So, we have to create an auto App Rate Us Method in Android Studio.
Before creating the project, we have provided some assets to support its development.
Implement the App Color Code in the “colors.xml” file.
Here, we have to insert the color code to customise your application project.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
</resources>
Replace “Action Bar” with “No Action Bar”.
<style name=”Theme.ThakurPrasad2026″ parent=”Theme.MaterialComponents.DayNight.NoActionBar”>
<!– Primary brand color. –>
<item name=”colorPrimary”>@color/purple_500</item>
<item name=”colorPrimaryVariant”>@color/purple_700</item>
<item name=”colorOnPrimary”>@color/white</item>
<!– Secondary brand color. –>
<item name=”colorSecondary”>@color/teal_200</item>
<item name=”colorSecondaryVariant”>@color/teal_700</item>
<item name=”colorOnSecondary”>@color/black</item>
<!– Status bar color. –>
<item name=”android:statusBarColor”>?attr/colorPrimaryVariant</item>
<!– Customize your theme here. –>
</style>
Implement the layout code for “activity_main.xml” for demo purposes, as shown below.
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Rate Us Dialog Method"
android:textColor="@color/black"
android:textSize="26sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
Implement the Dependency to develop the App Rate Us Dialog given below.
// Dependency for Rating Dialog
implementation("com.github.hotchemi:android-rate:1.0.1")
Implement the Code in the “MainActivity.Java” file given below.
Here, we have to create a rate us dialog method.
AppRate.with(this)
.setInstallDays(1)
.setLaunchTimes(1)
.setRemindInterval(2)
.monitor();
AppRate.showRateDialogIfMeetsConditions(this);
Thank You!