Mistakes show

Android wechat pay after successful return App did not go back

After you return to the APP, the navigation bar of the APP appears black



So now your app is a point that’s out of focus and nothing is happening and you can hit the physics back button so you can use your app again, okay

How to solve it?

The first reaction is that there is no wechat callback method after successful paymentWXPayEntryActivity

Didn’t leavebaseResp.errCode==0The method of

@Override public void onResp(BaseResp baseResp) { if (baseResp.getType() == ConstantsAPI.COMMAND_PAY_BY_WX) { mOrderId =  SharedPreferenceUtil.getString(ORDER_KEY, null); Switch (baserESP. errCode) {case 0: ToastUtils. ShowShort (this, "recharge successfully "); finish(); break; case -1: startActivity(new Intent(this, RechargeOrderActivity.class)); finish(); Toastutils.showshort (this, "signature error or other exception "); Log.e(TAG, "signature error, unregistered APPID, project set APPID incorrect, registered APPID mismatch, other exceptions, etc. "); break; Case-2: // The user cancels ToastUtils. ShowShort (this, r.sing.cancel_pay); startActivity(new Intent(this, RechargeOrderActivity.class)); finish(); break; }}}Copy the code

It is ok to check the code here. I added a TYPE judgment before and removed this judgment. After the successful payment of wechat, you can successfully call back!

I want to work my way up

Fly forward on the blades at the highest point

Let the wind blow dry tears and sweat

I want to work my way up

Waiting for the sun to watch its face

Little days have big dreams

I have my day

Let the wind blow dry tears and sweat

One day I will have my day