开发者

Get authorId from Device - android

I am using Android Market api. I use it to retrieve all the commen开发者_如何学Gots to my app: http://code.google.com/p/android-market-api/wiki/HowToGetAppComments

My question is how can I know what is the authorId of the current user? I just need to know if that user already write a comment or not.

Thanks!


The example code at the link you posted shows this:

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

Based on the source code , to get theauthorID of the first comment for example, you should be able to use

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜