Ask the right users to rate your app with Firebase
What do we need in the app?
- Create a view (dialog, popup, card, …) to ask for rating. In this example, we are using a simple dialog with
Yes
orNot Now
options - Place the rating view behind a Remote Config condition:
if (firebaseRemoteConfig.getBoolean(SHOULD_SHOW_RATING_DIALOG)) {
showRatingDialog();
}
3. Check for remote config updates. This can be done every time the app is launched or when opening a specific activity.
firebaseRemoteConfig.fetch()
What do we need in Firebase?
- Define a Remote Config boolean property. This property will have a default value of
false
and will only becometrue
if a certain condition is met.
2. Create an Audience that matches your current criteria to show the prompt for rating view.
It can be anything that makes sense for you. In this case, we are interested in asking for feedback only to users that have made a purchase in the app at least once and are living in the UK.
3. Create a Remote Config Condition to match the Audience created in 2.
4. Finally, add this Condition to the Remote Config property created in 1. with an associated value true
With this system in place the business rules to prompt users for rating are not hardcoded in the app but instead, they live in Firebase.
This way, we can share those rules among platforms or even modify them without deploying a new version of the app