int flag = mIntent.getFlags();
if((flag & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY ) != 0) {
startActivity(new Intent(this,SplashActivity.class));
finish();
}
PS:
- HOME键的执行顺序:onPause->onStop->onRestart->onStart->onResume
- BACK键的顺序: onPause->onStop->onDestroy->onCreate->onStart->onResume
- onPause不要做太耗时的工作