Here you can find the source of start(Context context, Intent broadcastIntent, int requestCode, long delayAtMillis, long period)
@Deprecated public static void start(Context context, Intent broadcastIntent, int requestCode, long delayAtMillis, long period)
//package com.java2s; import android.app.AlarmManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.os.SystemClock; public class Main { @Deprecated public static void start(Context context, Intent broadcastIntent, int requestCode, long delayAtMillis, long period) { PendingIntent sender = genPendingBroadcast(context, requestCode, broadcastIntent);/*from w w w. ja v a2 s . c om*/ long currentTime = SystemClock.elapsedRealtime(); AlarmManager am = (AlarmManager) context .getSystemService(Context.ALARM_SERVICE); am.cancel(sender); am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, currentTime + delayAtMillis, period, sender); } private static PendingIntent genPendingBroadcast(Context context, int requestCode, Intent broadcastIntent) { PendingIntent pendingIntent = PendingIntent.getBroadcast(context, requestCode, broadcastIntent, PendingIntent.FLAG_UPDATE_CURRENT); return pendingIntent; } public static void cancel(Context context, Intent broadcastIntent, int requestCode) { PendingIntent sender = genPendingBroadcast(context, requestCode, broadcastIntent); AlarmManager am = (AlarmManager) context .getSystemService(Context.ALARM_SERVICE); am.cancel(sender); } }