【问题标题】:How can I check whether the current account has reviewed my Android application in Google Play? [duplicate]如何查看当前帐户是否已在 Google Play 中查看过我的 Android 应用程序? [复制]
【发布时间】:2013-05-23 14:16:32
【问题描述】:

目前在我的 Android 应用程序中,我有一个弹出窗口,可将用户带到我在 Google Play 商店中的应用程序,以便他们查看我的应用程序。仅当当前用户帐户尚未审核我的应用程序时,我才想显示弹出窗口。是否可以检查该帐户是否已经写了评论或对应用程序进行了评级?

【问题讨论】:

标签: android


【解决方案1】:

没有官方的 Google API 可以访问 Google Play 数据,但是,有一个非官方的
android-market-api 可以让您列出所有应用的 cmets。

来自android-market-api wiki 的示例:

CommentsRequest commentsRequest = CommentsRequest.newBuilder()
                                .setAppId("7065399193137006744")
                                .setStartIndex(0)
                                .setEntriesCount(10)
                                .build();

 session.append(commentsRequest, new Callback<CommentsResponse>() {
  @Override
    public void onResult(ResponseContext context, CommentsResponse response) {
        System.out.println("Response : " + response);
        // response.getComments(0).getAuthorName()
        // response.getComments(0).getCreationTime()
        // ...
    }
});

session.flush();

假设输出类似:

{
  "comments": [
    {
      "rating": 5,
      "creationTime": 1269710736815,
      "authorName": "Nate Kidwell",
      "text": "Tremendous application. More examples would be great (as would integrated rubydocs), but awesome all the same.",
      "authorId": "04441815096871118032"
    },
...

然后,您可以在评论列表中识别当前用户,以检查他是否已经评论过您的应用。

【讨论】:

  • 我只需要评论而不是文本。
  • @user2413972 此 API 仅抓取 Google Play 以获取应用审查列表。 (您可以通过向play.google.com/store/apps/details?id=com.example.yourapp 发送 HTTP 请求来自己做一件事)。然后,您需要用户名或 ID 来检查他是否发表了评论。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-03-01
  • 2014-10-10
  • 2014-03-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多