I am developing an Android App. In which everything is working right. My app is ready to launch. But there I need to implement one more feature. I need to display a popup wh
As of August 2020, Google Play's In-App Review API is available and its straightforward implementation is correct as per this answer.
But if you wish add some display logic on top of it, use the Five-Star-Me library.
Set launch times and install days in the onCreate method of the MainActivity to configure the library.
FiveStarMe.with(this)
.setInstallDays(0) // default 10, 0 means install day.
.setLaunchTimes(3) // default 10
.setDebug(false) // default false
.monitor();
Then place the below method call on any activity / fragment's onCreate / onViewCreated method to show the prompt whenever the conditions are met.
FiveStarMe.showRateDialogIfMeetsConditions(this); //Where *this* is the current activity.
Installation instructions:
You can download from jitpack.
Step 1: Add this to project (root) build.gradle.
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2: Add the following dependency to your module (app) level build.gradle.
dependencies {
implementation 'com.github.numerative:Five-Star-Me:2.0.0'
}