代码之家  ›  专栏  ›  技术社区  ›  HelloCW

我怎么能认识一个已经通过Google Play In-App Review API完成应用程序评级的用户?

  •  0
  • HelloCW  · 技术社区  · 5 年前

    我已经读过这篇文章了 Google Play In-App Review API .

    Google Play In-App Review API允许您提示用户提交Play Store评分和评论,而不会像代码A一样给您的应用程序或游戏带来不便

    我怎么能认识一个已经通过Google Play In-App Review API完成应用程序评级的用户?

    我希望如果用户已经为应用程序提交了评级,评级UI不会再次显示。

    代码A

    //val manager = ReviewManagerFactory.create(mContext)
    val manager = FakeReviewManager(mContext)
    
    val request = manager.requestReviewFlow()
    
    request.addOnCompleteListener { task ->
        if (task.isSuccessful) {
            // We got the ReviewInfo object
            val reviewInfo = task.result
    
            val flow = manager.launchReviewFlow(mActivity, reviewInfo)
            flow.addOnCompleteListener { _ ->
                // The flow has finished. The API does not indicate whether the user
                // reviewed or not, or even whether the review dialog was shown. Thus, no
                // matter the result, we continue our app flow.
                Log.e("my","cc")
            }
            Log.e("my","bb")
    
        } else {
            Log.e("my","aa")
            // There was some problem, continue regardless of the result.
        }
    }
    
    0 回复  |  直到 5 年前
        1
  •  3
  •   ADM    5 年前

    如果你担心评分,如果用户已经为应用程序提交了评论,UI会再次出现。它不会出现。然而,正如我所观察到的,它将返回“成功”响应。请参阅 Test documentation .

        2
  •  0
  •   patrickhoette    5 年前

    最后我检查了一下,不可能知道这一点,因为它违反了谷歌的政策。他们明确表示,你不允许给用户提供评论的好处,因此他们不会为你提供工具来知道是否有人真正评论了你的应用程序。

    当我检查时,有一些阴暗的方法可以通过检查你的应用程序的游戏商店列表(基本上是抓取网站)来发现这一点,但这同样违反了谷歌的政策,所以你不应该这样做。