Android application works when the phone is turned off

Is it possible to launch an android application, for example an alarm, when the phone is turned off.

+4
source share
8 answers

Technically, Android is based on a modified Linux kernel, and all processes running on Android are regular Linux processes. Thus, when the kernel goes down, all processes also shut down.

Alarm Manageris a system service that works with other system services within the same Linux process (System Server) through an instance of Dalvik VM. As I said, System Server is also a Linux process, like other processes, and will be terminated as soon as the entire kernel stops working.

, Android (, , , ..) System Server. ( Android ). , ​​.

+4

5 Android-, . " "

, , , "". , Android , ROM .

+8

@Anand Jain: Sorry .Android Does not Support This.

, , , , , .

, ( , ), , .

AlarmManager system alarm. services.getSystemService(Context.ALARM_SERVICE). , . AlarmManager, , , .

AlarmManager, - ANDROID

https://code.google.com/p/android/issues/detail?id=1942

+2

, , .

+1

, Android, .

+1

, Android, , .

, .

.

, , , () , , , .

. , .

+1

. , .

., , Alarm ( " "?).

- 1: AlarmManager .

- 2: SharedPreferences

3 (): , ACTION_SHUTDOWN QUICKBOOT_POWEROFF, Android , link1.

- 4:. andoid RECEIVE_BOOT_COMPLETED (link2), reset AlarmManager , SharedPreferences.

+1

No. If the phone is turned off, it can do nothing. If it is in sleep mode when the screen is off and not in use, the alarm will work like other types of notifications. I have never tried this specifically on the Galaxy S, but I'm sure this is a universal rule.

+1
source

Source: https://habr.com/ru/post/1607951/


All Articles