本文整理汇总了Java中com.tencent.mm.sdk.openapi.BaseResp类的典型用法代码示例。如果您正苦于以下问题:Java BaseResp类的具体用法?Java BaseResp怎么用?Java BaseResp使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BaseResp类属于com.tencent.mm.sdk.openapi包,在下文中一共展示了BaseResp类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onResp
import com.tencent.mm.sdk.openapi.BaseResp; //导入依赖的package包/类
@Override
public void onResp(BaseResp resp) {
Log.i(TAG, "onResp:"+resp+",resp.errCode="+resp.errCode);
switch (resp.errCode) {
case BaseResp.ErrCode.ERR_OK:
if(resp instanceof SendAuth.Resp){
SendAuth.Resp res=(Resp) resp;
Log.i(TAG, "res.resultUrl="+res.resultUrl);
Log.i(TAG, "res.token="+res.token);
Log.i(TAG, "res.userName="+res.userName);
Log.i(TAG, "res.transaction="+res.transaction);
new GetTokenTask(((SendAuth.Resp)resp).token).execute();
}
else{
finish();
}
break;
case BaseResp.ErrCode.ERR_USER_CANCEL:
case BaseResp.ErrCode.ERR_AUTH_DENIED:
default:
finish();
break;
}
}
示例2: onResp
import com.tencent.mm.sdk.openapi.BaseResp; //导入依赖的package包/类
@Override
public void onResp(BaseResp resp) {
LogUtils.e("%s: Share resp: code=%s, msg=%s, transaction=%s.", TAG, resp.errCode, resp.errStr, resp.transaction);
switch (resp.errCode) {
case BaseResp.ErrCode.ERR_OK:
LogUtils.e("%s: Share completed.", TAG);
if (listener != null) {
listener.send(Share.RESULT_SUCCESS, null);
}
break;
case BaseResp.ErrCode.ERR_USER_CANCEL:
LogUtils.e("%s: Share canceled.", TAG);
if (listener != null) {
listener.send(Share.RESULT_CANCELD, null);
}
break;
default:
if (listener != null) {
listener.send(Share.RESULT_FAILED, null);
}
break;
}
finish();
}
示例3: onResp
import com.tencent.mm.sdk.openapi.BaseResp; //导入依赖的package包/类
@Override
public void onResp(BaseResp baseResp) {
switch (baseResp.errCode) {
case BaseResp.ErrCode.ERR_OK:
Toast.makeText(this, "share ok", Toast.LENGTH_SHORT).show();
break;
case BaseResp.ErrCode.ERR_USER_CANCEL:
Toast.makeText(this, "share cancel", Toast.LENGTH_SHORT).show();
break;
case BaseResp.ErrCode.ERR_AUTH_DENIED:
Toast.makeText(this, "share denied", Toast.LENGTH_SHORT).show();
break;
default:
break;
}
finish();
}
示例4: onResp
import com.tencent.mm.sdk.openapi.BaseResp; //导入依赖的package包/类
@Override
public void onResp(BaseResp resp) {
String result = "";
switch (resp.errCode) {
case BaseResp.ErrCode.ERR_OK:
result = "发送成功";
break;
case BaseResp.ErrCode.ERR_USER_CANCEL:
result = "发送取消";
break;
case BaseResp.ErrCode.ERR_AUTH_DENIED:
result = "发送被拒绝";
break;
default:
result = "发送返回";
break;
}
Toast.makeText(this, result, Toast.LENGTH_LONG).show();
finish();
}
示例5: onResp
import com.tencent.mm.sdk.openapi.BaseResp; //导入依赖的package包/类
@Override
public void onResp(BaseResp resp) {
int result = 0;
switch (resp.errCode) {
case BaseResp.ErrCode.ERR_OK:
result = R.string.errcode_success;
break;
case BaseResp.ErrCode.ERR_USER_CANCEL:
result = R.string.errcode_cancel;
break;
case BaseResp.ErrCode.ERR_AUTH_DENIED:
result = R.string.errcode_deny;
break;
default:
result = R.string.errcode_unknown;
break;
}
Toast.makeText(this, result, Toast.LENGTH_LONG).show();
}
示例6: onResp
import com.tencent.mm.sdk.openapi.BaseResp; //导入依赖的package包/类
@Override
public void onResp(BaseResp resp) {
int result = 0;
switch (resp.errCode) {
case BaseResp.ErrCode.ERR_OK:
result = R.string.errcode_success;
break;
case BaseResp.ErrCode.ERR_USER_CANCEL:
result = R.string.errcode_cancel;
break;
case BaseResp.ErrCode.ERR_AUTH_DENIED:
result = R.string.errcode_deny;
break;
default:
result = R.string.errcode_unknown;
break;
}
Toast.makeText(this, result, Toast.LENGTH_LONG).show();
finish();
}
示例7: onResp
import com.tencent.mm.sdk.openapi.BaseResp; //导入依赖的package包/类
@Override
public void onResp(BaseResp resp) {
logger.d("onResp " + resp.errCode);
boolean success = false;
switch (resp.errCode) {
case BaseResp.ErrCode.ERR_OK:
success = true;
break;
case BaseResp.ErrCode.ERR_USER_CANCEL:
case BaseResp.ErrCode.ERR_AUTH_DENIED:
default:
success = false;
break;
}
LogicFactory.self().getShare().completeShare(success);
finish();
}
示例8: onResp
import com.tencent.mm.sdk.openapi.BaseResp; //导入依赖的package包/类
@Override
public void onResp(BaseResp resp) {
int result = 0;
switch (resp.errCode) {
case BaseResp.ErrCode.ERR_OK:
result = R.string.weixin_send_success;
break;
case BaseResp.ErrCode.ERR_USER_CANCEL:
result = R.string.weixin_send_cancel;
break;
case BaseResp.ErrCode.ERR_AUTH_DENIED:
result = R.string.weixin_send_deny;
break;
default:
result = R.string.weixin_send_unknown_error;
break;
}
RLUiUtil.toast(this, result);
finish();
}