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();
精彩评论