Naveentp / In-App-Review-API-Demo

Testing In-App Review API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not getting Review pop-up yet all..

MittapalliHareesh opened this issue · comments

Hi, I am trying on the signed application. And written entire code in the onCreate method. The code is executing and printing "OnSuccess" and "OnComplete" messages. But not getting Review dialog.

Application id is the same as play store app id only.

   //Create a ReviewManager instance.
    reviewManager = ReviewManagerFactory.create(context!!)

    //Request a reviewInfo object ahead of time.
    val requestFlow = reviewManager.requestReviewFlow()
    requestFlow.addOnCompleteListener { task ->
        reviewInfo = if (task.isSuccessful) {
            task.result
        } else {
            null
        }
    }

    Handler().postDelayed({
        reviewInfo?.let { it ->
            val flow = reviewManager.launchReviewFlow(activity!!, it)
            flow.addOnSuccessListener {
                Toast.makeText(activity, "OnSuccess", Toast.LENGTH_LONG).show()
            }

            flow.addOnFailureListener {
                Toast.makeText(activity, it.message, Toast.LENGTH_LONG).show()
            }

            flow.addOnCompleteListener {
                Toast.makeText(activity, "OnComplete", Toast.LENGTH_LONG).show()
            }
        }
    }, 3000)

Can help on this, Thanks !!