I'm following this article https://proandroiddev.com/detecting-when-an-android-app-backgrounds-in-2018-4b5a94977d5c to implement android lifecycle but on a legacy app that has the Application class on java.
How can I implement this kotlin code in java?
private val lifecycleListener: SampleLifecycleListener by lazy {
SampleLifecycleListener()
}
I feel that is a dumb question, but I'm not familiar with lazy initialization and I'm not sure how to search this question, any "lazy theory link" will be welcome also.