Search code examples
androidandroid-activitymobile-application

Does a android App work if phone is switch off


Whether it is possible to launch an android application like alarm while the phone is switched off.


Solution

  • Technically Android is based on a modified Linux kernel and all processes running in Android are regular Linux processes. As such, when the kernel goes down then all processes also shutdown.

    Alarm Manager is a system service which is running, along with other system services, inside a single Linux process (System Server) through its Dalvik VM instance. As I've already said, System Server is also a Linux process like other processes and will shutdown once whole kernel has stopped running.

    Basically, all Android system services (e.g. Notification manager, Package manager, Camera, ...) are running inside that System Server standalone process. (However, in newer versions of Android some of them are slitted up to multiple processes). And this process is no longer running whenever the kernel stops.