lateinit var manager: ReviewManager var reviewInfo: ReviewInfo? = null // Call this method asap, for example in onCreate() private fun initReviews() { manager = ReviewManagerFactory.create(this) manager.requestReviewFlow().addOnCompleteListener { request -> if (request.isSuccessful) { reviewInfo = request.result } else { // Log error } } } // Call this when you want to show the dialog private fun askForReview() { if (reviewInfo != null) { manager.launchReviewFlow(this, reviewInfo).addOnFailureListener { // Log error and continue with the flow }.addOnCompleteListener { _ -> // Log success and continue with the flow } } }