Comparable<ReminderRequest>, Sequenceablepublic class ReminderRequestCalendar extends ReminderRequest
ReminderRequest child class used for creating reminders for calendar events.
You can use this class to publish calendar event reminders at a specified time (accurate to minute) on a particular day or on particular days in the specific months.
ReminderRequestTimer,
ReminderRequestAlarmSequenceable.Producer<T>ACTION_BUTTON_TYPE_CLOSE, ACTION_BUTTON_TYPE_SNOOZE| 构造器 | 说明 |
|---|---|
ReminderRequestCalendar(LocalDateTime dateTime,
int[] repeatMonths,
int[] repeatDays) |
A constructor used to create a
ReminderRequestCalendar instance. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
boolean |
marshalling(Parcel out) |
Marshals this
Sequenceable object into a Parcel. |
boolean |
unmarshalling(Parcel in) |
Unmarshals this
Sequenceable object from a Parcel. |
compareTo, equals, getContent, getExpiredContent, getNotificationId, getRingDuration, getSlotId, getSnoozeContent, getSnoozeTimes, getTimeInterval, getTitle, hashCode, setActionButton, setContent, setExpiredContent, setIntentAgent, setMaxScreenIntentAgent, setNotificationId, setRingDuration, setSlotId, setSnoozeContent, setSnoozeTimes, setTimeInterval, setTitle, toStringhasFileDescriptorpublic ReminderRequestCalendar(LocalDateTime dateTime, int[] repeatMonths, int[] repeatDays)
ReminderRequestCalendar instance. The calendar event reminder
will be triggered at a specified time.
Ensure that the input parameters meet the following requirements. Otherwise, the application may crash due to an illegal parameter exception.
dateTime parameter cannot be null. repeatMonths parameter cannot be null. repeatDays parameter cannot be null. repeatMonths array cannot exceed 12. repeatDays array cannot exceed 31. dateTime
does not expire, or repeatMonths and repeatDays are valid.dateTime - Indicates the date and time when this calendar event reminder will be triggered.
The time is accurate to minute. For example, the value LocalDateTime.of(2021, 3, 3, 16, 15) indicates
that the reminder will be triggered at 16:15 on March 3, 2021.repeatMonths - Indicates the months in which this reminder will be repeated. For example,
the value {2, 4} indicates that the reminder will be triggered on particular days in February and April.repeatDays - Indicates the days in a month when this reminder will be repeated. For example,
the value {2, 4} indicates that the reminder will be triggered on the second and fourth days of
the specific months.
The repeatMonths and repeatDays parameters must both be set to implement repeated reminders.
By default, this reminder is not snoozed. You can call ReminderRequest.setTimeInterval(long) to set the snooze
interval.
If a snooze interval is set, this reminder will be snoozed for three times by default.
You can call ReminderRequest.setSnoozeTimes(int) to change the snooze times.public boolean marshalling(Parcel out)
SequenceableSequenceable object into a Parcel.marshalling 在接口中 Sequenceablemarshalling 在类中 ReminderRequestout - Indicates the Parcel object to which the Sequenceable
object will be marshaled..true if the marshalling is successful; returns false otherwise.public boolean unmarshalling(Parcel in)
SequenceableSequenceable object from a Parcel.unmarshalling 在接口中 Sequenceableunmarshalling 在类中 ReminderRequestin - Indicates the Parcel object into which the Sequenceable
object has been marshaled.true if the unmarshalling is successful; returns false otherwise.