Executing simple code on android app before closing
Hello, I've been trying to integrate airpush in andriod but I've been
having some issues.
@Override public boolean onKeyDown(int keyCode, KeyEvent event) {
if ((keyCode == KeyEvent.KEYCODE_BACK) && mWebView.canGoBack()) {
mWebView.goBack();
return true;
}
return super.onKeyDown(keyCode, event);
}
As you can see is the andriod go back code for webview via history.
The problem is that I want execute this code when it has no more history,
meaning when the application is about to close.
airpush.startLandingPageAd();
Any help will be greatly appreciated guys :)..
No comments:
Post a Comment