Most of the time, some features need to know the lifecycle to implement some specific functionality; Or when you write a tool, like a download function, you have to copy and paste it; So it’s wrapped — the ZLifeCycle call is very simple as follows:

You just pass in the context, and then the listener can do whatever it wants with the cycle.

Call as follows:

The project is as follows: github.com/LillteZheng…

Or directly related

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io'}}}Copy the code

Then the associated

implementation 'com. Making. LillteZheng: ZlifeCycle: v1.0'
Copy the code

Of course, jar form is supported, please download the latest JAR: