Play Core In-App Review API not showing the Review Activity

后端 未结 15 1128
生来不讨喜
生来不讨喜 2021-01-30 05:15

I\'m trying to utilize the Review API (Play Core library 1.8.0) from Google which was just released yesterday. See https://developer.android.com/guide/playcore/in-app-review

15条回答
  •  庸人自扰
    2021-01-30 05:46

    My working code:

    private fun askForReview() {
        val manager = ReviewManagerFactory.create(this)
        manager.requestReviewFlow().addOnCompleteListener { request ->
            if (request.isSuccessful) {
                val reviewInfo = request.result
                manager.launchReviewFlow(this, reviewInfo).addOnFailureListener {
                    logWarning("In-app review request failed, reason=$it")
                }.addOnCompleteListener { _ ->
                    logInfo("In-app review finished")
                }
            } else {
                logWarning("In-app review request failed, reason=${request.exception}")
            }
        }
    }
    

    Tested on an app from Internal Test track (there is no quota there).

提交回复
热议问题