Search code examples
androidclockalarm

Can android developers access the system clock/alarm application?


My Nexus S comes with a default clock application where I can set an alarm. When I set an alarm then I see a little clock in my status bar.

If I go to 'Manage Applications' or 'Running Services', I would expect to see Clock there, but I don't?

If I go to 'All' from 'Manage Applications', then I do see the Clock app, and I can Force Quit it, however the clock in the status bar still appears.

If the default Clock application never appears in Running Applications or Services because it is part of the system, then can developers access this Clock app? For instance I am creating an alarm application, should it be possible to hookup the alarms from my application to the system Clock app?


Solution

  • As far as I can tell, the alarm clock is a system service, which may be why it is not visible to you. There is only one clock on each device, so any alarm you make will utilize the system clock in some form or another. Here is an old tutorial for making an alarm using AlarmManager. And here is a link to an API demo on the dev pages for making an alarm.