Aspect Android buried statistics activity page usage duration onResume onPause, and save the duration

Aspect Android buried statistics activity page usage duration onResume onPause, and save the duration mark: 1.build.gradle under the project dependencies { classpath ‘com.android.tools.build:gradle:3.5.4’ classpath ‘com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.10’ } 2. build.gradle in the app folder apply plugin: ‘com.hujiang.android-aspectjx’ // Configure AspectJX aspectjx { exclude ‘androidx.core’,’androidx.appcompat’ } dependencies { ……. //Introduce AspectJX dependency implementation ‘org.aspectj:aspectjrt: 1.9.8’ … } import […]

Fragment.OnPause thing

We know that the life cycle of Fragment is attached to the life cycle of the corresponding Activity. If activity A calls onPause, the fragment in A will also receive the onPause callback accordingly. Here, the source code of the support27.1.1 version is used to explain the onPause of the Fragment life cycle. . When […]

Activity.OnPause thing

We know that when starting a new Activity (B), the onPause of the old Activity (A) will be executed first, and then the new Activity will be started; at this time, if a time-consuming operation is performed in A’s onPause, it will definitely affect Until B starts, if A’s onPasuse keeps performing time-consuming operations, can […]