使用 com.tencent.mm.opensdk:wechat-sdk-android-with-mta:5.3.1
在部分华为鸿蒙系统手机中无法拉起微信支付,问题如下视频;
val req = PayReq()
其中req数据如下
{"appId":"wxa350acc9a2bda3de","extData":"20230803174246936906","nonceStr":"bb25e56ad1bf5c6e5e670b42bf23120f","packageValue":"Sign\u003dWxpay","partnerId":"1616947273","prepayId":"wx03174247102675a088f92cce7c455c0000","sign":"Z+GP6o/VcyDS3nBc8jrR9YO881rKk7iXe89DF2+0R4C/U5djZRz6eyd6hwBrcVN0f15YalcEG3MoW2adcIs4JLal4bv7ZM+Fo9so3g3Gcv0bgUSxFYEZYWOewBys0Ep9yJw/777LPnNHdxxBwL2zGT3MpDeYAUJMbYh8vfL5GMYWSBjOOBe5vvcIpB+PfoLnquq9LkKOmiPes2u5ahcd/+QPBusP7+wvyb66n2lcfEkEPq+T/avabaKqTMTaOqgfO63ZBlqT0qcJ3uIAd0H/FKCJT6w+T+r+36M8OojKhWYIh4QGN6uNXacCudQoYedtphWnnb9eFHCI+kmTNVxKzQ\u003d\u003d","timeStamp":"1691055767"}
api!!.sendReq(req) 返回值为true
调用后日志如下
08-03 17:42:46.259 15837 15837 I MicroMsg.SDK.WXApiImplV10: sendReq, req type = 5
08-03 17:42:46.278 15837 15837 D MicroMsg.SDK.WXApiImplV10: pay, set wxappPayEntryClassname = com.tencent.mm.plugin.base.stub.WXPayEntryActivity
08-03 17:42:46.356 15837 15837 V MicroMsg.SDK.WXApiImplV10.ActivityLifecycleCb: com.mcy.othermiss.pay.TestPayActivity onActivityPaused
08-03 17:42:47.157 15837 15837 V MicroMsg.SDK.WXApiImplV10.ActivityLifecycleCb: WXStat trigger onBackground
08-03 17:43:02.416 15837 15837 V MicroMsg.SDK.WXApiImplV10.ActivityLifecycleCb: com.mcy.othermiss.pay.TestPayActivity onActivityResumed
08-03 17:43:03.216 15837 15837 V MicroMsg.SDK.WXApiImplV10.ActivityLifecycleCb: WXStat trigger onForeground
其余手机没问题,唯有其中几台鸿蒙手机有问题,这台手机是nova 7SE 5G,别的手机都没问题,这是为什么
最终 WXPayEntryActivity 中没有执行onResp 方法
解决了吗,我们也遇到这个问题,求教
@官方