【问题标题】:Get authorId from Device - android从设备获取 authorId - android
【发布时间】:2011-09-28 05:52:38
【问题描述】:

我正在使用 Android Market api。 我用它来检索我的应用程序的所有 cmets: http://code.google.com/p/android-market-api/wiki/HowToGetAppComments

我的问题是如何知道当前用户的 authorId 是什么? 我只需要知道该用户是否已经写了评论。

谢谢!

【问题讨论】:

    标签: android google-play


    【解决方案1】:

    您发布的链接中的示例代码显示了这一点:

    public void onResult(ResponseContext context, CommentsResponse response)
    {
        System.out.println("Response : " + response);
        // response.getComments(0).getAuthorName()
        // response.getComments(0).getCreationTime()
        // ...
    }
    

    基于source code,以获取第一条评论的authorID为例,应该可以使用

    String id = response.getComments(0).getAuthorID();
    

    【讨论】:

    • 这不是我的问题。我知道如何从评论中获取 AuthorID。但我不知道如何从设备或用户获取 AuthorID。为了更清楚,我需要知道什么是 AuthorID 以及如何从用户名或电话中获取它?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-20
    • 2011-05-01
    相关资源
    最近更新 更多