How can I tell if my Application is resumed from background?

前端 未结 5 1967
北恋
北恋 2021-02-04 10:57

I want to lock my application when it goes in background and when it resumes I want to display my own lock screen. The lock screen is an Activity of my application.

Aft

5条回答
  •  渐次进展
    2021-02-04 11:22

    Your activity has an onResume() callback in its life cycle. Simple override this and do what you need to do.

提交回复
热议问题