正常启动
在Activity启动时,系统首先调用OnCreate()函数分配资源,然后onStart()显示Activity,onResume()获取屏幕焦点;
正常结束
后三行为结束时的系统调用:函数调用顺序为onPause()->onStop()->onDestroy();
程序运行中,切换到其他程序
onPause()->onSaveInstanceState()->onStop();
程序运行中,有短信和电话呼入
本程序先结束,然后启动通话进程并保存记录
拒接电话而返回原程序时的函数调用
onRestart()->onStart()->onResume()
程序被系统强制关闭
onPause()->onSaveInstanceState()->onStop();