FileDocCategorySizeDatePackage
AlarmService_Alarm.javaAPI DocGoogle Android v1.5 Example1853Sun Nov 11 13:01:04 GMT 2007com.google.android.samples.app

AlarmService_Alarm

public class AlarmService_Alarm extends android.content.IntentReceiver
This is an example of implementing an {@link IntentReceiver} for an alarm that will start a service when it goes off. This is useful when your code handling an alarm will not be quite (more than 5 seconds or so) -- instead of doing all your work in the receiver (and making all other receivers wait until you are done), you can start a service that will then take care of things.

Fields Summary
Constructors Summary
Methods Summary
public voidonReceiveIntent(android.content.Context context, android.content.Intent intent)

        // Start up the service.  Note that if the service is taking too long
        // to complete -- longer than our alarm's repeat rate -- then this will
        // just leave the current service running, skipping this alarm.  For
        // most situations this is probably a reasonable thing to do.
        context.startService(new Intent(context, AlarmService_Service.class),
                null);