In some cases, we may need to detect when app enters the background or foreground. For example, we want to know how much time users spend using our app.
KDoc is the language for documenting Kotlin code, and Dokka is the engine for generating documentation from KDoc. Dokka can generate documentation in pretty nice HTML format.
The Android Broadcast Receiver component allows an app to receive messages from the Android system or other apps, and to send messages to other components of the app itself, or to other apps. It is similar to the publish-subscribe design pattern.
Android Bound Service is a client-server architecture. It allows Android components (clients) to bind Service (server) to send requests and even perform interprocess communication (IPC).
Android Service is one of the four application components of Android. It can perform longer-running work in the background, such as playing music, downloading files, etc. So Service does not provide user interface. This article will introduce the basic concepts of Service.
Kotlin coroutine flow includes cold flow and hot flow. SharedFlow and StateFlow are two of the hot flows. They can broadcast values to several receivers, so can be used to implement the publisher-subscriber pattern.
WorkManager is the officially recommended API for persistent work in the background. The persistent work refers to the work remains scheduled through app restarts or system reboots.