现在的位置: 首页 > 综合 > 正文

————–Activity onNewIntent 方法调用时机

2018年03月20日 ⁄ 综合 ⁄ 共 504字 ⁄ 字号 评论关闭

http://blog.sina.com.cn/s/blog_9f233c070101os69.html

1. 当AndroidManiFest.xml 配置为singleTask
          进入页面
          onCreate
          onStart
          onResume

 点击home

 onPause

 onStop


 点击应用程序图标

 onNewIntent

     onRestart

 onStart

 onResume

 

在页面内startActivity时

onCreate

onStart

onResume

2.
当AndroidManiFest.xml 配置为singleTop 
进入页面
onCreate
onStart
onResume

 点击home

  onPause

  onStop

点击应用程序图标

onRestart

onStart

onResume

 

 

在页面内startActivity时

onCreate

onStart

onResume

由此可见,AndroidManiFest配置singleTop 或者singleTask 只是在桌面中点击应用程序图标时,出现调用出现不同

抱歉!评论已关闭.