- type
- One of AlarmManager.ELAPSED_REALTIME, AlarmManager.ELAPSED_REALTIME_WAKEUP, AlarmManager.RTC, or AlarmManager.RTC_WAKEUP.
- windowStartMillis
- The earliest time, in milliseconds, that the alarm should be delivered, expressed in the appropriate clock's units (depending on the alarm type).
- windowLengthMillis
- The length of the requested delivery window, in milliseconds. The alarm will be delivered no later than this many milliseconds after windowStartMillis. Note that this parameter is a duration, not the timestamp of the end of the window.
- operation
- Action to perform when the alarm goes off; typically comes from PendingIntent.GetBroadcast(Android.Content.Context, System.Int32, System.Int32, System.Int32).
Schedule an alarm to be delivered within a given window of time. This method is similar to AlarmManager.Set(AlarmType, System.Int64, System.Int64), but allows the application to precisely control the degree to which its delivery might be adjusted by the OS. This method allows an application to take advantage of the battery optimizations that arise from delivery batching even when it has modest timeliness requirements for its alarms.
This method can also be used to achieve strict ordering guarantees among multiple alarms by ensuring that the windows requested for each alarm do not intersect.
When precise delivery is not required, applications should use the standard AlarmManager.Set(AlarmType, System.Int64, System.Int64) method. This will give the OS the most flexibility to minimize wakeups and battery use. For alarms that must be delivered at precisely-specified times with no acceptable variation, applications can use AlarmManager.SetExact(AlarmType, System.Int64, System.Int64).