AppLifecycleManager

object AppLifecycleManager

应用生命周期管理器

Functions

equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
getActivityCallback
Link copied to clipboard
private fun getActivityCallback(activity: Activity?): List<Application.ActivityLifecycleCallbacks>
getCurrentActivity
Link copied to clipboard
fun getCurrentActivity(): Activity?
获取当前的 Activity
getCurrentFragmentActivity
Link copied to clipboard
fun getCurrentFragmentActivity(): FragmentActivity?
获取当前的 FragmentActivity (由 Activity 进行类型转换得到)
hashCode
Link copied to clipboard
open fun hashCode(): Int
observeActivityCallback
Link copied to clipboard
fun observeActivityCallback(activity: Activity, callback: Application.ActivityLifecycleCallbacks)
为对应的 Activity 增加 生命周期回调
registerApplication
Link copied to clipboard
fun registerApplication(application: Application)
注册 Application,并处理响应的回调
removeActivityCallbacks
Link copied to clipboard
private fun removeActivityCallbacks(activity: Activity?): Boolean
toString
Link copied to clipboard
open fun toString(): String

Properties

activityCallbacks
Link copied to clipboard
private val activityCallbacks: MutableMap<Int, List<Application.ActivityLifecycleCallbacks>>
currentActivityWeakRef
Link copied to clipboard
private var currentActivityWeakRef: WeakReference<Activity>? = null