当前位置: 首页>>代码示例>>Java>>正文


Java BaseResp类代码示例

本文整理汇总了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;
	}
}
 
开发者ID:LingjuAI,项目名称:AssistantBySDK,代码行数:26,代码来源:WXEntryActivity.java

示例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();
}
 
开发者ID:szitguy,项目名称:Allshare,代码行数:25,代码来源:WXEntryActivity.java

示例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();
}
 
开发者ID:jhwing,项目名称:SKShare,代码行数:18,代码来源:WXEntryActivity.java

示例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();
}
 
开发者ID:L-value,项目名称:Android-Plugin-Framework,代码行数:24,代码来源:WXEntryActivity.java

示例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();
}
 
开发者ID:8tory,项目名称:wechat-android-sdk,代码行数:22,代码来源:WXEntryActivity.java

示例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();
}
 
开发者ID:simplelifetian,项目名称:GomeOnline,代码行数:23,代码来源:WXEntryActivity.java

示例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();
}
 
开发者ID:tassadar2002,项目名称:ouser,代码行数:18,代码来源:WXEntryActivity.java

示例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();
}
 
开发者ID:RincLiu,项目名称:Roid-Library,代码行数:21,代码来源:RLWXEntryActivity.java


注:本文中的com.tencent.mm.sdk.openapi.BaseResp类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。