我想销毁 webview 并在应用退出时在我的应用中启动 airpush 广告。这是一种稳定的方式还是应该将它们结合在一起
public void onDestroy()
{
if (mWebView != null)
{
mWebView.removeAllViews();
mWebView.destroy();
}
super.onDestroy();
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
airpush.startAppWall();
airpush.startDialogAd();
airpush.startLandingPageAd();
finish();
}
return super.onKeyDown(keyCode, event);
}