android 荣耀50 pro, 无法唤起小程序
问题: 集成 微信 android sdk, 在荣耀50 pro, 无法唤起小程序(调用方法后, 一点动静也没有), 目前只发现这手机异常. 代码: fun goToWeChatMiniProgrammAuth(context: Context) {
val api = WXAPIFactory.createWXAPI(context, )
if (!api.isWXAppInstalled) {
AtworkToast.showToast(context.getString(R.string.wx_need_install))
return
}
val req: WXLaunchMiniProgram.Req = WXLaunchMiniProgram.Req()
req.userName = AtworkConfig.WX_USER_NAME // 填小程序原始id
req.path = AtworkConfig.WX_PAGE_PATH
req.miniprogramType = WXLaunchMiniProgram.Req.MINIPTOGRAM_TYPE_RELEASE
api.sendReq(req)
}
控制台信息: 2021-07-20 13:55:53.794 4188-4188/com.foreverht.szient D/MicroMsg.PaySdk.WXFactory: createWXAPI, appId = wx0f62f69efce131d9, checkSignature = true
2021-07-20 13:55:53.794 4188-4188/com.foreverht.szient D/MicroMsg.SDK.WXApiImplV10: <init>, appId = wx0f62f69efce131d9, checkSignature = true
2021-07-20 13:55:53.794 4188-4188/com.foreverht.szient D/MicroMsg.SDK.WXMsgImplComm: check signature:308202eb30820254a00302010202044d36f7a4300d06092a864886f70d01010505003081b9310b300906035504061302383631123010060355040813094775616e67646f6e673111300f060355040713085368656e7a68656e31353033060355040a132c54656e63656e7420546563686e6f6c6f6779285368656e7a68656e2920436f6d70616e79204c696d69746564313a3038060355040b133154656e63656e74204775616e677a686f7520526573656172636820616e6420446576656c6f706d656e742043656e7465723110300e0603550403130754656e63656e74301e170d3131303131393134333933325a170d3431303131313134333933325a3081b9310b300906035504061302383631123010060355040813094775616e67646f6e673111300f060355040713085368656e7a68656e31353033060355040a132c54656e63656e7420546563686e6f6c6f6779285368656e7a68656e2920436f6d70616e79204c696d69746564313a3038060355040b133154656e63656e74204775616e677a686f7520526573656172636820616e6420446576656c6f706d656e742043656e7465723110300e0603550403130754656e63656e7430819f300d06092a864886f70d010101050003818d0030818902818100c05f34b231b083fb1323670bfbe7bdab40c0c0a6efc87ef2072a1ff0d60cc67c8edb0d0847f210bea6cbfaa241be70c86daf56be08b723c859e52428a064555d80db448cdcacc1aea2501eba06f8bad12a4fa49d85cacd7abeb68945a5cb5e061629b52e3254c373550ee4e40cb7c8ae6f7a8151ccd8df582d446f39ae0c5e930203010001300d06092a864886f70d0101050500038181009c8d9d7f2f908c42081b4c764c377109a8b2c70582422125ce545842d5f520aea69550b6bd8bfd94e987b75a3077eb04ad341f481aac266e89d3864456e69fba13df018acdc168b9a19dfd7ad9d9cc6f6ace57c746515f71234df3a053e33ba93ece5cd0fc15f3e389a3f365588a9fcb439e069d3629cd7732a13fff7b891499
2021-07-20 13:55:53.794 4188-4188/com.foreverht.szient D/MicroMsg.SDK.WXMsgImplComm: pass
2021-07-20 13:55:53.794 4188-4188/com.foreverht.szient D/MicroMsg.SDK.WXMsgImplComm: check signature:308202eb30820254a00302010202044d36f7a4300d06092a864886f70d01010505003081b9310b300906035504061302383631123010060355040813094775616e67646f6e673111300f060355040713085368656e7a68656e31353033060355040a132c54656e63656e7420546563686e6f6c6f6779285368656e7a68656e2920436f6d70616e79204c696d69746564313a3038060355040b133154656e63656e74204775616e677a686f7520526573656172636820616e6420446576656c6f706d656e742043656e7465723110300e0603550403130754656e63656e74301e170d3131303131393134333933325a170d3431303131313134333933325a3081b9310b300906035504061302383631123010060355040813094775616e67646f6e673111300f060355040713085368656e7a68656e31353033060355040a132c54656e63656e7420546563686e6f6c6f6779285368656e7a68656e2920436f6d70616e79204c696d69746564313a3038060355040b133154656e63656e74204775616e677a686f7520526573656172636820616e6420446576656c6f706d656e742043656e7465723110300e0603550403130754656e63656e7430819f300d06092a864886f70d010101050003818d0030818902818100c05f34b231b083fb1323670bfbe7bdab40c0c0a6efc87ef2072a1ff0d60cc67c8edb0d0847f210bea6cbfaa241be70c86daf56be08b723c859e52428a064555d80db448cdcacc1aea2501eba06f8bad12a4fa49d85cacd7abeb68945a5cb5e061629b52e3254c373550ee4e40cb7c8ae6f7a8151ccd8df582d446f39ae0c5e930203010001300d06092a864886f70d0101050500038181009c8d9d7f2f908c42081b4c764c377109a8b2c70582422125ce545842d5f520aea69550b6bd8bfd94e987b75a3077eb04ad341f481aac266e89d3864456e69fba13df018acdc168b9a19dfd7ad9d9cc6f6ace57c746515f71234df3a053e33ba93ece5cd0fc15f3e389a3f365588a9fcb439e069d3629cd7732a13fff7b891499
2021-07-20 13:55:53.794 4188-4188/com.foreverht.szient D/MicroMsg.SDK.WXMsgImplComm: pass
2021-07-20 13:55:53.794 4188-4188/com.foreverht.szient I/MicroMsg.SDK.WXApiImplV10: sendReq, req type = 19
2021-07-20 13:55:53.798 1543-2770/? V/ActivityManager: Successfully start provider ContentProviderRecord{5baddf0 u0 com.tencent.mm/.plugin.base.stub.WXCommProvider} launchingApp=ProcessRecord{b5c8633 8558:com.tencent.mm/u0a178} caller pid= 4188
2021-07-20 13:55:53.808 1543-3407/? I/ActivityTaskManager: START u0 {flg=0x10000000 hwFlg=0x10 cmp=com.tencent.mm/.plugin.base.stub.WXBizEntryActivity (has extras)} from uid 10178
2021-07-20 13:55:53.810 1543-3407/? W/ActivityTaskManager: Background activity start [callingPackage: com.tencent.mm; callingUid: 10178; isCallingUidForeground: true; callingUidHasAnyVisibleWindow: false; callingUidProcState: BOUND_TOP; isCallingUidPersistentSystemProcess: false; realCallingUid: 10178; isRealCallingUidForeground: true; realCallingUidHasAnyVisibleWindow: false; realCallingUidProcState: BOUND_TOP; isRealCallingUidPersistentSystemProcess: false; originatingPendingIntent: null; isBgStartWhitelisted: false; intent: Intent { dat=weixin://dl/jumpWxa/?appid=wx0f62f69efce131d9&userName=gh_d2b06f77ef8d@app&path=pages/authenticate/login/login-face/login-face?from=app&appName=深i企&responseType=code&skipbind=1&invokeData=&pathType=0&runtimeAppid=&runtimeTicket=&runtimeSessionId= flg=0x10000000 cmp=com.tencent.mm/.plugin.base.stub.WXBizEntryActivity (has extras) }; callerApp: ProcessRecord{b5c8633 8558:com.tencent.mm/u0a178}; shouldAbortSelfLaunchWhenReturnHome: false]
2021-07-20 13:55:53.811 1543-3407/? I/ActivityTaskManager: ActivityRecord info: ActivityInfo{3f08c1c com.tencent.mm.plugin.base.stub.WXBizEntryActivity}
2021-07-20 13:55:53.811 1543-3407/? D/ActivityTaskManager: TaskLaunchParamsModifier:task=null activity=ActivityRecord{78665fa u0 com.tencent.mm/.plugin.base.stub.WXBizEntryActivity task-display-area=DefaultTaskDisplayArea@67826401 display-area-windowing-mode=1
2021-07-20 13:55:53.812 1543-3407/? D/ActivityTaskManager: TaskLaunchParamsModifier:task=Task{638b468 #67 visible=false type=standard mode=fullscreen translucent=true A=10178:com.tencent.mm U=0 StackId=67 sz=17} activity=ActivityRecord{78665fa u0 com.tencent.mm/.plugin.base.stub.WXBizEntryActivity t-1} display-from-task=0 task-display-area=DefaultTaskDisplayArea@67826401 display-area-windowing-mode=1 non-freeform-display
2021-07-20 13:55:53.814 1543-3407/? I/WindowManager: addWindowToken: displayid:0 binder:Token{1c46025 ActivityRecord{78665fa u0 com.tencent.mm/.plugin.base.stub.WXBizEntryActivity t-1}} token:ActivityRecord{78665fa u0 com.tencent.mm/.plugin.base.stub.WXBizEntryActivity t-1}
期望: 正常唤起小程序.