微信分享跳转生命周期:
app ---> 微信 ----> 分享成功或返回 ----> WXEntryActivity( onCreate ---> onResp )
解决方案:
private String transaction;
@Override
public void onResp(BaseResp resp) {
transaction = resp.transaction;
}
@Override
protected void onResume() {
super.onResume();
if (!TextUtils.isEmpty(transaction)) {
transaction.startsWith("webpage");
finish();
}
}