Java tutorial
//package com.java2s; //License from project: Open Source License import android.app.AlarmManager; import android.app.PendingIntent; import android.content.Context; public class Main { public static void setAlarm(Context context, PendingIntent intent, long time) { AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); alarmManager.set(AlarmManager.RTC_WAKEUP, time, intent); } }