Android activity lifecycle - different depending on method of install?

I just noticed some weird behaviour with my Android 2.3.3 application. I can write some extra code to deal with it, but I'd like to understand why it's happening in the first place! When I install via Xcode (just by hitting F11 and debugging as normal) the lifecycle for one of my activities is as follows when I simply start the app, let the activity appear, press the home button on my device to close it (minimize it), then open it up again. onCreate onStart onResume onPause onStop onRestart onStart onResume However, if I export the application to an APK and install it by email, I get this behaviour: onCreate onStart onResume onPause onStop onCreate ****** onStart onResume ... which is exactly the same, except that onCreate is called this time when I re-open the app. I've looked at the lifecycle documentation and I thought that onDestroy had to be called before onCreate could be called when resuming? Is that a wrong assumption? Thanks, Steven
This answer must help you--- stackoverflow.com/questions/5918973/…

以上就是Android activity lifecycle - different depending on method of install?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏