다음을 통해 공유


AlarmManager.SetAlarmClock(AlarmManager+AlarmClockInfo, PendingIntent) Method

Definition

Schedule an alarm that represents an alarm clock, which will be used to notify the user when it goes off.

[Android.Runtime.Register("setAlarmClock", "(Landroid/app/AlarmManager$AlarmClockInfo;Landroid/app/PendingIntent;)V", "GetSetAlarmClock_Landroid_app_AlarmManager_AlarmClockInfo_Landroid_app_PendingIntent_Handler")]
[Android.Runtime.RequiresPermission("android.permission.SCHEDULE_EXACT_ALARM")]
public virtual void SetAlarmClock (Android.App.AlarmManager.AlarmClockInfo info, Android.App.PendingIntent operation);
[<Android.Runtime.Register("setAlarmClock", "(Landroid/app/AlarmManager$AlarmClockInfo;Landroid/app/PendingIntent;)V", "GetSetAlarmClock_Landroid_app_AlarmManager_AlarmClockInfo_Landroid_app_PendingIntent_Handler")>]
[<Android.Runtime.RequiresPermission("android.permission.SCHEDULE_EXACT_ALARM")>]
abstract member SetAlarmClock : Android.App.AlarmManager.AlarmClockInfo * Android.App.PendingIntent -> unit
override this.SetAlarmClock : Android.App.AlarmManager.AlarmClockInfo * Android.App.PendingIntent -> unit

Parameters

operation
PendingIntent

Action to perform when the alarm goes off; typically comes from M:Android.App.PendingIntent.GetBroadcast(Android.Content.Context,System.Int32,System.Int32,System.Int32).

Attributes

Remarks

Java documentation for android.app.AlarmManager.setAlarmClock(android.app.AlarmClockInfo, 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.

Applies to

See also

  • <xref:Android.App.AlarmManager.Set(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)>
  • <xref:Android.App.AlarmManager.SetExact(Android.App.AlarmType%2c+System.Int64%2c+System.Int64)>
  • Cancel(PendingIntent)
  • NextAlarmClock
  • SendBroadcast(Intent)
  • <xref:Android.Content.Context.RegisterReceiver(Android.Content.BroadcastReceiver%2c+Android.Content.IntentFilter)>
  • FilterEquals(Intent)