content: package com.adymilk.easybrowser.wxapi;
  
  import android.app.Activity;
  import android.os.Bundle;
  
  import com.tencent.mm.opensdk.modelbase.BaseReq;
  import com.tencent.mm.opensdk.modelbase.BaseResp;
  import com.tencent.mm.opensdk.openapi.IWXAPI;
  import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler;
  import com.tencent.mm.opensdk.openapi.WXAPIFactory;
  
  /**
   * Created by jack on 17-9-1.
   */
  
  public class WXEntryActivity extends Activity implements IWXAPIEventHandler {
      // IWXAPI 是第三方app和微信通信的openapi接口
      private IWXAPI api;
      private String WX_APP_ID = "wxee53eb68352c793e";
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          api = WXAPIFactory.createWXAPI(this, WX_APP_ID, false);
          api.handleIntent(getIntent(), this);
          super.onCreate(savedInstanceState);
      }
      @Override
      public void onReq(BaseReq arg0) { }
  
      @Override
      public void onResp(BaseResp resp) {
  //        LogManager.show(TAG, "resp.errCode:" + resp.errCode + ",resp.errStr:" + resp.errStr, 1);
  
          switch (resp.errCode) {
              case BaseResp.ErrCode.ERR_OK:
                  //分享成功
                  break;
              case BaseResp.ErrCode.ERR_USER_CANCEL:
                  //分享取消
                  break;
              case BaseResp.ErrCode.ERR_AUTH_DENIED:
                  //分享拒绝
                  break;
          }
      }
  }
  