コード例 #1
0
  @Override
  protected MessageListBean getDoInBackgroundMiddleData(String beginId, String endId)
      throws WeiboException {
    String id = userBean.getId();

    StatusesTimeLineDao dao = new StatusesTimeLineDao(token, id);

    dao.setMax_id(beginId);
    dao.setSince_id(endId);

    MessageListBean result = dao.getGSONMsgList();

    return result;
  }
コード例 #2
0
  @Override
  protected MessageListBean getDoInBackgroundOldData() throws WeiboException {
    String id = userBean.getId();
    String screenName = userBean.getScreen_name();

    StatusesTimeLineDao dao = new StatusesTimeLineDao(token, id);
    if (TextUtils.isEmpty(id)) {
      dao.setScreen_name(screenName);
    }
    if (getList().getSize() > 0) {
      dao.setMax_id(getList().getItemList().get(getList().getSize() - 1).getId());
    }
    MessageListBean result = dao.getGSONMsgList();

    return result;
  }
コード例 #3
0
  @Override
  protected MessageListBean getDoInBackgroundNewData() throws WeiboException {

    String id = userBean.getId();
    String screenName = userBean.getScreen_name();

    StatusesTimeLineDao dao = new StatusesTimeLineDao(token, id);

    if (TextUtils.isEmpty(id)) {
      dao.setScreen_name(screenName);
    }

    if (getList().getSize() > 0) {
      dao.setSince_id(getList().getItem(0).getId());
    }
    MessageListBean result = dao.getGSONMsgList();

    MyStatusDBTask.add(result, GlobalContext.getInstance().getCurrentAccountId());

    return result;
  }