android - How to distinguish whether onDestroy will be called after onPause -
is there way how distinguish whether ondestroy() called after onpause()? in may activity need different action when activity lost focus , when activity going down, when activity going down onpause() called before ondestroy() want different action in onpause() when activity lost focus , when going down , ondestroy() gonna called.
yes with:
@override protected void onpause() { super.onpause(); if (this.isfinishing()) { // waht want before destroying... } } but of course can't handle if app crashs ;)
Comments
Post a Comment