예제 #1
0
 // 微信发送请求到第三方应用时,会回调到该方法
 @Override
 public void onReq(BaseReq req) {
   switch (req.getType()) {
     case ConstantsAPI.COMMAND_GETMESSAGE_FROM_WX:
       goToGetMsg();
       break;
     case ConstantsAPI.COMMAND_SHOWMESSAGE_FROM_WX:
       goToShowMsg((ShowMessageFromWX.Req) req);
       break;
     default:
       break;
   }
 }
 public void toBundle(Bundle bundle) {
   super.toBundle(bundle);
   bundle.putAll(er.toBundle(message));
   bundle.putInt("_wxapi_sendmessagetowx_req_scene", scene);
 }
 public void fromBundle(Bundle bundle) {
   super.fromBundle(bundle);
   message = er.fromBundle(bundle);
   scene = bundle.getInt("_wxapi_sendmessagetowx_req_scene");
 }
예제 #4
0
 private void addBasicReqParams(Map<String, String> reqMap, BaseReq req) {
   req.setMsgType(reqMap.get("MsgType"));
   req.setFromUserName(reqMap.get("FromUserName"));
   req.setToUserName(reqMap.get("ToUserName"));
   req.setCreateTime(Long.parseLong(reqMap.get("CreateTime")));
 }