tags:

views:

33

answers:

1

In short, I am looking for the implementation of the IAlarmManager.

I am interested in the scheduling done by the AlarmManager.setInexactRepeating method and so I started looking for the implementation but I haven't been able to find anything. Internally to AlarmManager, I can see that the actual work is being done by an android.app.IAlarmManager interface. After googling around for a bit there seems to reference to an implementing class called android.app.IAlarmManager.Stub but that is as far I get. I am working with Android 1.6.

+3  A: 

IAlarmManager is AIDL interface - used for RPC calls to remote Service.

The IAlarmManager.Stub is nested static class, used for obtaining and referencing the remote service - the Service you'll be exposing through the interface will extend the *.Stub class. For more info on using AIDL look here: http://developer.android.com/guide/developing/tools/aidl.html

The concrete service that you are looking for is called AlarmManagerService. You can find its source code and the implementation of setInexactRepeating() here: http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=services/java/com/android/server/AlarmManagerService.java

Hope that helps.

Dimitar Dimitrov
That is perfect. Thanks so much!
Crawlder