@Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    final UMSocialService mController =
        UMServiceFactory.getUMSocialService("com.umeng.share", RequestType.SOCIAL);

    /** 使用SSO授权必须添加如下代码 */
    UMSsoHandler ssoHandler = mController.getConfig().getSsoHandler(requestCode);
    if (ssoHandler != null) {
      ssoHandler.authorizeCallBack(requestCode, resultCode, data);
    }
  }
示例#2
0
  @SuppressWarnings("unchecked")
  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    // TODO Auto-generated method stub
    super.onActivityResult(requestCode, resultCode, data);
    System.out.println("为什么没有");
    switch (requestCode) {
      case CALENDAR:
        if (resultCode == RESULT_OK) {
          List<Map<String, Object>> list =
              (List<Map<String, Object>>) data.getSerializableExtra("list");
          showListView(list);
        }
        break;

      case ADDNOTE:
        if (resultCode == RESULT_OK) {
          showListView();
        }
        break;

      case EDITNOTE:
        if (resultCode == RESULT_OK) {
          showListView();
        }
        break;

      default:
        /** 使用SSO必须添加,指定获取授权信息的回调页面,并传给SDK进行处理 */
        UMSsoHandler sinaSsoHandler = umSocialService.getConfig().getSinaSsoHandler();
        if (sinaSsoHandler != null && requestCode == UMSsoHandler.DEFAULT_AUTH_ACTIVITY_CODE) {
          sinaSsoHandler.authorizeCallBack(requestCode, resultCode, data);
        }
        break;
    }
  }