Quote:
Originally Posted by DerAlte Doesn't that happen in ANY phone if one switches the phone off (powers down)? How will the phone power itself on unless triggered by the Power-on button? It needs a wake-up section in hardware, which can keep working even if other sections are powered off and trigger a power-on in the same way a long press on the power button does. This section is usually associated with a clock, but may not be implemented everywhere. |
This is available on Nokia and Samsung phones (Except Android phones)
How it works
----------------
Well the way it works is using the RTC module , On a PC BIOS backed by a battery keeps track of the clock and if you pull out Li-Ion BIOS battery date and time of your PC will be reset after reboot.
On system using embedded processors same is achieved using the main battery itself. On the ARM based CPUs of today there are multiple power modes. Even during the power off the RTC modules draws little power (negligible actually) and system clock is on while CPU and all the peripherals are off.
When the alarm is set and the phone is powering down alarm service or subsystem in user space writes down the next wakeup time to the module controlling RTC through system call and driver interface ( internally called by system call)
So for implementing this feature in any OS 3 things are required
1. Hardware capability , Today all ARM based CPUs on which Android is available has this ( Qualcomm MSM 7201A , Snapdragon , TI OMAP 34XX and Samsung SC6410 , C110 ) , Even more primitive processors have this capability so this is not an issue.
2. Alarm Subsystem and RTC driver which can sense that phone is powering off and write next makeup values to RTC.
3. System APIs by which Alarm subsystem can use the RTC driver framework to write these values to the RTC.
4. A minimal application which comes up at the time of wake-up and prompts user if he/she wants to boot OS.
If device vendors are controlling the OS they can easily implement 2, 3 and 4 and thus cheap Nokia ,Samsung and blackberry phones have it.
Why It does not work on Android ( Also Windows Mobile)
This is an old pending bug in Android Issue number 1942. ( there are lots of similar bugs raised some of them closed down)
Actually there are a number of problems related to Alarm some of them were fixed in 1.5 and some of them are left open , Some fixed ones need to be reopened IMHO seeing that they are not fully fixed.
Bug 1942 received no attention from those who control the release . Some times the reason provided is why would anyone need this feature and sometimes the buck is passed saying it needs hardware capability which is obviously not true. Many other times buck is passed stating it does not exist in Windows mobile and iPhone so should not exist in Android as well.
This is there because item 2 , 3 and 4 do not exist in Android. In my opinion there are lots of other high priority pending issues in Android alarm module so this comes at lower priority
Why device manufacturers like Samsung , Motorola and HTC do not provide 2 ,3 and 4 themselves
This is quite possible but believe me or not , power on from alarm wake up is not the only issue.
It is the matter of policy so if suppose all such issues are being fixed inhouse then a sum total will be a big fork from mainstream. It will be fork as these device manufacturers do not decide what is going in the next release. Then it would mean an effort as big as maintaining an inhouse OS.
Creating fork will mean loosing all benifits of a 3ed party OS.
Motorola clearly will not want to do this as in 2008 they abondoned Linux-Java ( renamed to motomagic later) to save costs when they had finencial trouble. Samsung has a number of in-house platforms to maintain and Android is just another 3ed party OS. I do not know about HTC they should do actually as it is their bread and butter.
While Open Source-ness of Android may excite evangalists and app developers who write in java layer, Closed maintainence model is a big concern for system developers and managers.
PS : For those who believe that Chip vendors and hardware manufacturer are some how responsible for RTC issue as they do not contribute to OS they need to check kernel.org where whole kernel source code of SC6410 and OMAP platform is available barring proprietary codecs source code.