友盟分享微信成功回调
@Override
public void onResp(BaseResp baseResp) {
String result = "";
if (baseResp.getType() == ConstantsAPI.COMMAND_SENDMESSAGE_TO_WX) {
switch (baseResp.errCode) {
case BaseResp.ErrCode.ERR_OK:
result = "分享成功";
Toast.makeText(this, result, Toast.LENGTH_LONG).show();
finish();
break;
case BaseResp.ErrCode.ERR_AUTH_DENIED:
result = "分享失败";
Toast.makeText(this, result, Toast.LENGTH_LONG).show();
finish();
break;
default:
finish();
break;
}
} else {
switch (baseResp.errCode) {
case BaseResp.ErrCode.ERR_OK:
//result ="发送成功";
code = ((SendAuth.Resp) baseResp).code;
Thread thread = new Thread(runnable);
thread.start();
break;
case BaseResp.ErrCode.ERR_USER_CANCEL:
result = "微信登录取消";
Toast.makeText(this, result, Toast.LENGTH_LONG).show();
finish();
Intent intent = new Intent(WXEntryActivity.this, LoginActivity.class);
startActivity(intent);
break;
case BaseResp.ErrCode.ERR_AUTH_DENIED:
result = "发送被拒绝";
Toast.makeText(this, result, Toast.LENGTH_LONG).show();
finish();
break;
default:
result = "发送返回";
Toast.makeText(this, result, Toast.LENGTH_LONG).show();
finish();
break;
}
}
}