Exemplo n.º 1
0
    @Override
    protected void onSuccess(UnreadCount result) {
      super.onSuccess(result);

      // 通知消息
      unreadCountNotifier.notinfyUnreadCount(AppContext.getUnreadCount());

      sendUnreadBroadcast();
    }
Exemplo n.º 2
0
    @Override
    protected void onSuccess(String s) {
      super.onSuccess(s);

      //            Logger.v(TAG, s);
      layInput.setVisibility(View.GONE);
      layWeb.setVisibility(View.VISIBLE);
      // 加载网页
      webView.loadDataWithBaseURL("https://api.weibo.com", s, "text/html", "UTF-8", "");
    }
Exemplo n.º 3
0
    @Override
    protected void onSuccess(WeiBoUser result) {
      super.onSuccess(result);

      Logger.d(TAG, "授权成功");

      BaiduAnalyzeUtils.onEvent("add_account", "添加授权账号");

      showMessage(R.string.account_auth_success);

      if (getActivity() != null) {
        getActivity().finish();
      }
    }
Exemplo n.º 4
0
    @Override
    protected void onSuccess(TokenInfo tokenInfo) {
      super.onSuccess(tokenInfo);

      // 同一登录账户
      if (tokenInfo != null
          && AppContext.isLoggedIn()
          && AppContext.getAccount().getUid().equals(tokenInfo.getUid())) {
        if (BaseActivity.getRunningActivity() != null
            && BaseActivity.getRunningActivity() instanceof MainActivity) {
          if (getParams()[0].getAccessToken().isExpired())
            requestLogin(BaseActivity.getRunningActivity(), getParams()[0]);
        }
      }
    }