AlarmManager.Set 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.
Overloads
| Set(AlarmType, Int64, String, AlarmManager+IOnAlarmListener, Handler) | |
| Set(AlarmType, Int64, PendingIntent) |
Schedule an alarm. |
Set(AlarmType, Int64, String, AlarmManager+IOnAlarmListener, Handler)
[Android.Runtime.Register("set", "(IJLjava/lang/String;Landroid/app/AlarmManager$OnAlarmListener;Landroid/os/Handler;)V", "GetSet_IJLjava_lang_String_Landroid_app_AlarmManager_OnAlarmListener_Landroid_os_Handler_Handler", ApiSince=24)]
public virtual void Set (Android.App.AlarmType type, long triggerAtMillis, string? tag, Android.App.AlarmManager.IOnAlarmListener? listener, Android.OS.Handler? targetHandler);
[<Android.Runtime.Register("set", "(IJLjava/lang/String;Landroid/app/AlarmManager$OnAlarmListener;Landroid/os/Handler;)V", "GetSet_IJLjava_lang_String_Landroid_app_AlarmManager_OnAlarmListener_Landroid_os_Handler_Handler", ApiSince=24)>]
abstract member Set : Android.App.AlarmType * int64 * string * Android.App.AlarmManager.IOnAlarmListener * Android.OS.Handler -> unit
override this.Set : Android.App.AlarmType * int64 * string * Android.App.AlarmManager.IOnAlarmListener * Android.OS.Handler -> unit
Parameters
- type
- AlarmType
- triggerAtMillis
- Int64
- tag
- String
- listener
- AlarmManager.IOnAlarmListener
- targetHandler
- Handler
- 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
Set(AlarmType, Int64, PendingIntent)
Schedule an alarm.
[Android.Runtime.Register("set", "(IJLandroid/app/PendingIntent;)V", "GetSet_IJLandroid_app_PendingIntent_Handler")]
public virtual void Set (Android.App.AlarmType type, long triggerAtMillis, Android.App.PendingIntent? operation);
[<Android.Runtime.Register("set", "(IJLandroid/app/PendingIntent;)V", "GetSet_IJLandroid_app_PendingIntent_Handler")>]
abstract member Set : Android.App.AlarmType * int64 * Android.App.PendingIntent -> unit
override this.Set : Android.App.AlarmType * int64 * Android.App.PendingIntent -> unit
Parameters
- type
- AlarmType
type of alarm.
- triggerAtMillis
- Int64
time in milliseconds that the alarm should go off, using the appropriate clock (depending on the alarm type).
- operation
- PendingIntent
Action to perform when the alarm goes off;
typically comes from PendingIntent#getBroadcast
IntentSender.getBroadcast().
- Attributes
Remarks
Java documentation for android.app.AlarmManager.set(int, long, android.app.PendingIntent).
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.
See also
- Handler
- <xref:Android.App.AlarmManager.SetExact(Android.App.AlarmType%2c+System.Int64%2c+System.Int64)>
- <xref:Android.App.AlarmManager.SetRepeating(Android.App.AlarmType%2c+System.Int64%2c+System.Int64%2c+System.Int64)>
- <xref:Android.App.AlarmManager.SetWindow(Android.App.AlarmType%2c+System.Int64%2c+System.Int64%2c+System.Int64)>
- Cancel(PendingIntent)
- SendBroadcast(Intent)
- <xref:Android.Content.Context.RegisterReceiver(Android.Content.BroadcastReceiver%2c+Android.Content.IntentFilter)>
- FilterEquals(Intent)