/** 获取消息数据 */ private void postLoad() { asyncHttpClient = new AsyncHttpClient(); asyncHttpClient.addHeader("Cookie", getContext().getLoginUserCookie()); asyncHttpClient.setUserAgent(Constants.USER_AGENT); RequestParams rp = new RequestParams(); asyncHttpClient.post(getActivity(), Constants.queryMessageAPI, rp, responseHandler); }
@Override public void onDestroy() { super.onDestroy(); if (asyncHttpClient != null) asyncHttpClient.cancelRequests(getActivity(), true); if (mMessageReceiver != null) getActivity().unregisterReceiver(mMessageReceiver); }