Android 微信支付集成总结

一、参考文档
二、问题总结

<activity
   android:name=".wxapi.WXPayEntryActivity"
   android:exported="true"
   android:launchMode="singleInstance"
   android:screenOrientation="portrait"
   android:theme="@style/TranslucentTheme"/>

方式二

  @Override
public void onResp(BaseResp resp) {
       Log.d("+++++++++++++++++++","微信支付回调");
       if (resp.getType() == ConstantsAPI.COMMAND_PAY_BY_WX) {
           EventBusCustom eventBusCustom = new EventBusCustom(EventBusCustom.WXPAY_RESULT,resp.errCode,null);
           EventBus.getDefault().postSticky(eventBusCustom);
//       AlertDialog.Builder builder = new AlertDialog.Builder(this);
//       builder.setTitle("返回结果");
//       builder.setMessage("微信支付结果:%s"+ resp.errStr +";code=" + String.valueOf(resp.errCode));
//       builder.show();
       }
       finish();
       overridePendingTransition(0,0);
   }
--------
<activity
   android:name=".wxapi.WXPayEntryActivity"
   android:exported="true"
   android:theme=" android:theme="@android:style/Theme.Translucent.NoTitleBar""
   android:launchMode="singleTop" />
-------
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容