當前位置: 首頁>>代碼示例>>Java>>正文


Java BaseReq類代碼示例

本文整理匯總了Java中com.tencent.mm.sdk.modelbase.BaseReq的典型用法代碼示例。如果您正苦於以下問題:Java BaseReq類的具體用法?Java BaseReq怎麽用?Java BaseReq使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


BaseReq類屬於com.tencent.mm.sdk.modelbase包,在下文中一共展示了BaseReq類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onReq

import com.tencent.mm.sdk.modelbase.BaseReq; //導入依賴的package包/類
@Override
public void onReq(BaseReq req) {
    Toast.makeText(this, "openid = " + req.openId, Toast.LENGTH_SHORT).show();

    switch (req.getType()) {
        case ConstantsAPI.COMMAND_GETMESSAGE_FROM_WX:
            goToGetMsg();
            break;
        case ConstantsAPI.COMMAND_SHOWMESSAGE_FROM_WX:
            goToShowMsg((ShowMessageFromWX.Req) req);
            break;
        case ConstantsAPI.COMMAND_LAUNCH_BY_WX:
            Toast.makeText(this, R.string.launch_from_wx, Toast.LENGTH_SHORT).show();
            break;
        default:
            break;
    }
}
 
開發者ID:linsir6,項目名稱:TripBuyer,代碼行數:19,代碼來源:WXEntryActivity.java

示例2: handleResult

import com.tencent.mm.sdk.modelbase.BaseReq; //導入依賴的package包/類
@Override
public void handleResult(Intent data) {
    mIWXAPI.handleIntent(data, new IWXAPIEventHandler() {
        @Override
        public void onReq(BaseReq baseReq) {
        }

        @Override
        public void onResp(BaseResp baseResp) {
            switch (baseResp.errCode) {
                case BaseResp.ErrCode.ERR_OK:
                    ShareUtil.mShareListener.shareSuccess();
                    break;
                case BaseResp.ErrCode.ERR_USER_CANCEL:
                    ShareUtil.mShareListener.shareCancel();
                    break;
                default:
                    ShareUtil.mShareListener.shareFailure(new Exception(baseResp.errStr));
            }
        }
    });
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:23,代碼來源:WxShareInstance.java

示例3: a

import com.tencent.mm.sdk.modelbase.BaseReq; //導入依賴的package包/類
public void a(JSONObject jSONObject) {
    String string = jSONObject.getString("appId");
    this.c.registerApp(string);
    this.c.handleIntent(this.a.getIntent(), this);
    BaseReq payReq = new PayReq();
    payReq.appId = string;
    payReq.partnerId = jSONObject.getString("partnerId");
    payReq.prepayId = jSONObject.getString("prepayId");
    payReq.nonceStr = jSONObject.getString("nonceStr");
    if (jSONObject.get("timeStamp") instanceof String) {
        payReq.timeStamp = jSONObject.getString("timeStamp");
    } else {
        payReq.timeStamp = jSONObject.getInt("timeStamp") + "";
    }
    payReq.packageValue = jSONObject.getString("packageValue");
    payReq.sign = jSONObject.getString("sign");
    this.c.sendReq(payReq);
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:19,代碼來源:q.java

示例4: genRequest

import com.tencent.mm.sdk.modelbase.BaseReq; //導入依賴的package包/類
public static BaseReq genRequest(WXMediaMessage msg, ShareTypeEnum type) {
    SendMessageToWX.Req req = new SendMessageToWX.Req();
    switch (type) {
        case TEXT:
            req.transaction = buildTransaction("text");
            break;
        case MUSIC:
            req.transaction = buildTransaction("music");
            break;
        case VIDEO:
            req.transaction = buildTransaction("video");
            break;
        case IMAGE:
            req.transaction = buildTransaction("img");
            break;
    }
    req.message = msg;
    req.scene = SendMessageToWX.Req.WXSceneSession;
    return req;
}
 
開發者ID:Jay-Y,項目名稱:share,代碼行數:21,代碼來源:WxUtils.java

示例5: onReq

import com.tencent.mm.sdk.modelbase.BaseReq; //導入依賴的package包/類
public void onReq(BaseReq basereq)
{
    switch (basereq.getType())
    {
    default:
        return;

    case 3: // '\003'
        Log.d("chenee", "never come here ??????");
        return;

    case 4: // '\004'
        a((com.tencent.mm.sdk.modelmsg.ShowMessageFromWX.Req)basereq);
        break;
    }
}
 
開發者ID:vishnudevk,項目名稱:MiBandDecompiled,代碼行數:17,代碼來源:WXEntryActivity.java

示例6: handleResult

import com.tencent.mm.sdk.modelbase.BaseReq; //導入依賴的package包/類
@Override
public void handleResult(int requestCode, int resultCode, Intent data) {
    mIWXAPI.handleIntent(data, new IWXAPIEventHandler() {
        @Override
        public void onReq(BaseReq baseReq) {
        }

        @Override
        public void onResp(BaseResp baseResp) {
            if (baseResp instanceof SendAuth.Resp && baseResp.getType() == 1) {
                SendAuth.Resp resp = (SendAuth.Resp) baseResp;
                switch (resp.errCode) {
                    case BaseResp.ErrCode.ERR_OK:
                        getToken(resp.code);
                        break;
                    case BaseResp.ErrCode.ERR_USER_CANCEL:
                        mLoginListener.loginCancel();
                        break;
                    case BaseResp.ErrCode.ERR_SENT_FAILED:
                        mLoginListener.loginFailure(new Exception(INFO.WX_ERR_SENT_FAILED));
                        break;
                    case BaseResp.ErrCode.ERR_UNSUPPORT:
                        mLoginListener.loginFailure(new Exception(INFO.WX_ERR_UNSUPPORT));
                        break;
                    case BaseResp.ErrCode.ERR_AUTH_DENIED:
                        mLoginListener.loginFailure(new Exception(INFO.WX_ERR_AUTH_DENIED));
                        break;
                    default:
                        mLoginListener.loginFailure(new Exception(INFO.WX_ERR_AUTH_ERROR));
                }
            }
        }
    });
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:35,代碼來源:WxLoginInstance.java

示例7: sendReq

import com.tencent.mm.sdk.modelbase.BaseReq; //導入依賴的package包/類
public final boolean sendReq(BaseReq baseReq) {
    if (this.detached) {
        throw new IllegalStateException("sendReq fail, WXMsgImpl has been detached");
    } else if (!WXApiImplComm.validateAppSignatureForPackage(this.context, "com.tencent.mm",
            this.checkSignature)) {
        a.a(TAG, "sendReq failed for wechat app signature check failed");
        return false;
    } else if (baseReq.checkArgs()) {
        a.d(TAG, "sendReq, req type = " + baseReq.getType());
        Bundle bundle = new Bundle();
        baseReq.toBundle(bundle);
        if (baseReq.getType() == 5) {
            return sendPayReq(this.context, bundle);
        }
        if (baseReq.getType() == 7) {
            return sendJumpToBizProfileReq(this.context, bundle);
        }
        if (baseReq.getType() == 8) {
            return sendJumpToBizWebviewReq(this.context, bundle);
        }
        if (baseReq.getType() == 9) {
            return sendAddCardToWX(this.context, bundle);
        }
        com.tencent.mm.sdk.a.a.a aVar = new com.tencent.mm.sdk.a.a.a();
        aVar.n = bundle;
        aVar.m = "weixin://sendreq?appid=" + this.appId;
        aVar.k = "com.tencent.mm";
        aVar.l = WXApp.WXAPP_MSG_ENTRY_CLASSNAME;
        return com.tencent.mm.sdk.a.a.a(this.context, aVar);
    } else {
        a.a(TAG, "sendReq checkArgs fail");
        return false;
    }
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:35,代碼來源:WXApiImplV10.java

示例8: sendReq

import com.tencent.mm.sdk.modelbase.BaseReq; //導入依賴的package包/類
public final boolean sendReq(BaseReq basereq)
{
    if (e)
    {
        throw new IllegalStateException("sendReq fail, WXMsgImpl has been detached");
    }
    if (!com.tencent.mm.sdk.openapi.c.a(b, "com.tencent.mm", d))
    {
        com.tencent.mm.sdk.b.a.a("MicroMsg.SDK.WXApiImplV10", "sendReq failed for wechat app signature check failed");
        return false;
    }
    if (!basereq.checkArgs())
    {
        com.tencent.mm.sdk.b.a.a("MicroMsg.SDK.WXApiImplV10", "sendReq checkArgs fail");
        return false;
    }
    com.tencent.mm.sdk.b.a.c("MicroMsg.SDK.WXApiImplV10", (new StringBuilder("sendReq, req type = ")).append(basereq.getType()).toString());
    Bundle bundle = new Bundle();
    basereq.toBundle(bundle);
    if (basereq.getType() == 5)
    {
        return a(b, bundle);
    }
    if (basereq.getType() == 7)
    {
        return b(b, bundle);
    }
    if (basereq.getType() == 8)
    {
        return c(b, bundle);
    } else
    {
        com.tencent.mm.sdk.a.a.a a1 = new com.tencent.mm.sdk.a.a.a();
        a1.e = bundle;
        a1.d = (new StringBuilder("weixin://sendreq?appid=")).append(c).toString();
        a1.b = "com.tencent.mm";
        a1.c = "com.tencent.mm.plugin.base.stub.WXEntryActivity";
        return com.tencent.mm.sdk.a.a.a(b, a1);
    }
}
 
開發者ID:vishnudevk,項目名稱:MiBandDecompiled,代碼行數:41,代碼來源:d.java

示例9: onReq

import com.tencent.mm.sdk.modelbase.BaseReq; //導入依賴的package包/類
@Override
public void onReq(BaseReq req) {
}
 
開發者ID:wp521,項目名稱:MyFire,代碼行數:4,代碼來源:WXPayEntryActivity.java

示例10: onReq

import com.tencent.mm.sdk.modelbase.BaseReq; //導入依賴的package包/類
@Override
public void onReq(BaseReq baseReq) {
}
 
開發者ID:yangjie127,項目名稱:ESSocialSDK-master,代碼行數:4,代碼來源:WXCallbackActivity.java

示例11: onReq

import com.tencent.mm.sdk.modelbase.BaseReq; //導入依賴的package包/類
public void onReq(BaseReq req) {
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:3,代碼來源:WXPayEntryActivity.java

示例12: onReq

import com.tencent.mm.sdk.modelbase.BaseReq; //導入依賴的package包/類
public void onReq(BaseReq arg0) {
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:3,代碼來源:WXPayEntryActivity.java

示例13: onReq

import com.tencent.mm.sdk.modelbase.BaseReq; //導入依賴的package包/類
@Override
public void onReq(BaseReq baseReq) {
    switch (baseReq.getType()) {
        case ConstantsAPI.COMMAND_GETMESSAGE_FROM_WX:
            break;
        case ConstantsAPI.COMMAND_SHOWMESSAGE_FROM_WX:
            break;
        default:
            break;
    }
}
 
開發者ID:junchenChow,項目名稱:exciting-app,代碼行數:12,代碼來源:WXEntryActivity.java

示例14: onReq

import com.tencent.mm.sdk.modelbase.BaseReq; //導入依賴的package包/類
public void onReq(BaseReq baseReq) {
    finish();
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:4,代碼來源:MWWXHandlerActivity.java

示例15: onReq

import com.tencent.mm.sdk.modelbase.BaseReq; //導入依賴的package包/類
public void onReq(BaseReq req) {
    if (this.mWxHandler != null) {
        this.mWxHandler.getWXEventHandler().onReq(req);
    }
    finish();
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:7,代碼來源:WXCallbackActivity.java


注:本文中的com.tencent.mm.sdk.modelbase.BaseReq類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。