微信回调WXEntryActivity未被成功销毁,检查WXEntryActivity 是否继承了继承WXCallbackActivity ,之前接过微信支付,发现集成的是Activity,所以出现回调成功后页面点不动,正确的方式如下:
public class WXEntryActivity extends WXCallbackActivity implements IWXAPIEventHandler {
private IWXAPI api;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
api = WXAPIFactory.createWXAPI(this, App.APP_ID, false);
try {
Intent intent = getIntent();
api.handleIntent(intent, this);
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setIntent(intent);
api.handleIntent(intent, this);
}
@Override
public void onReq(BaseReq req) {
super.onReq(req);
}
@Override
public void onResp(BaseResp resp) {
super.onResp(resp);
}
}