AlarmManager.SetInexactRepeating(AlarmType, Int64, Int64, PendingIntent) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Schedule a repeating alarm that has inexact trigger time requirements; for example, an alarm that repeats every hour, but not necessarily at the top of every hour.
[Android.Runtime.Register("setInexactRepeating", "(IJJLandroid/app/PendingIntent;)V", "GetSetInexactRepeating_IJJLandroid_app_PendingIntent_Handler")]
public virtual void SetInexactRepeating (Android.App.AlarmType type, long triggerAtMillis, long intervalMillis, Android.App.PendingIntent? operation);
[<Android.Runtime.Register("setInexactRepeating", "(IJJLandroid/app/PendingIntent;)V", "GetSetInexactRepeating_IJJLandroid_app_PendingIntent_Handler")>]
abstract member SetInexactRepeating : Android.App.AlarmType * int64 * int64 * Android.App.PendingIntent -> unit
override this.SetInexactRepeating : Android.App.AlarmType * int64 * int64 * Android.App.PendingIntent -> unit
Parameters
- type
- AlarmType
type of alarm.
- triggerAtMillis
- Int64
time in milliseconds that the alarm should first go off, using the appropriate clock (depending on the alarm type). This is inexact: the alarm will not fire before this time, but there may be a delay of almost an entire alarm interval before the first invocation of the alarm.
- intervalMillis
- Int64
interval in milliseconds between subsequent repeats
of the alarm. Prior to API 19, if this is one of INTERVAL_FIFTEEN_MINUTES,
INTERVAL_HALF_HOUR, INTERVAL_HOUR, INTERVAL_HALF_DAY, or INTERVAL_DAY
then the alarm will be phase-aligned with other alarms to reduce the
number of wakeups. Otherwise, the alarm will be set as though the
application had called #setRepeating. As of API 19, all repeating
alarms will be inexact and subject to batching with other alarms regardless
of their stated repeat interval.
- operation
- PendingIntent
Action to perform when the alarm goes off;
typically comes from PendingIntent#getBroadcast
IntentSender.getBroadcast().
- Attributes
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
See also
- Handler
- <xref:Android.App.AlarmManager.Set(Android.App.AlarmType%2c+System.Int64%2c+System.Int64)>
- Cancel(PendingIntent)
- SendBroadcast(Intent)
- <xref:Android.Content.Context.RegisterReceiver(Android.Content.BroadcastReceiver%2c+Android.Content.IntentFilter)>
- FilterEquals(Intent)
- IntervalFifteenMinutes
- IntervalHalfHour
- IntervalHour
- IntervalHalfDay
- IntervalDay