package dk.thoerup.marketstats; import java.util.List; import com.gc.android.market.api.MarketSession.Callback; import com.gc.android.market.api.model.Market.Comment; import com.gc.android.market.api.model.Market.CommentsResponse; import com.gc.android.market.api.model.Market.ResponseContext; public class CommentCallback implements Callback{ private List commentBeans; private int entryCount; public void setList(List cl) { commentBeans = cl; } public int getEntryCount() { return entryCount; } @Override public void onResult(ResponseContext context, CommentsResponse response) { //System.out.println("Response : " + response); entryCount = response.getEntriesCount(); //System.out.println("Count="+entryCount); List cl = response.getCommentsList(); for (Comment c : cl) { CommentBean bean = new CommentBean(); bean.author = c.getAuthorName(); bean.rating = c.getRating(); bean.time = c.getCreationTime(); bean.text = c.getText(); commentBeans.add(bean); } } }