W3Cschool
恭喜您成為首批注冊(cè)用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
java.lang.Object
|---ohos.event.notification.ReminderRequest
|---|---ohos.event.notification.ReminderRequestCalendar
public class ReminderRequestCalendar
extends ReminderRequest
用于為日歷事件創(chuàng)建提醒的 ReminderRequest 子類(lèi)。
您可以使用此類(lèi)在特定日期或特定月份的特定日期的指定時(shí)間(精確到分鐘)發(fā)布日歷事件提醒。
Since:
6
從接口 ohos.utils.Sequenceable 繼承的嵌套類(lèi)/接口 |
---|
Sequenceable.ProducerT |
從類(lèi) ohos.event.notification.ReminderRequest 繼承的字段 |
---|
ACTION_BUTTON_TYPE_CLOSE, ACTION_BUTTON_TYPE_SNOOZE |
構(gòu)造函數(shù) | 描述 |
---|---|
ReminderRequestCalendar(LocalDateTime dateTime, int[] repeatMonths, int[] repeatDays) | 用于創(chuàng)建 ReminderRequestCalendar 實(shí)例的構(gòu)造函數(shù)。 |
修飾符和類(lèi)型 | 方法 | 描述 |
---|---|---|
boolean | marshalling(Parcel out) | 將此 Sequenceable 對(duì)象編組為 Parcel。 |
boolean | unmarshalling(Parcel in) | 從 Parcel 中解組此 Sequenceable 對(duì)象。 |
從類(lèi) java.lang.Object 繼承的方法 |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
從類(lèi) ohos.event.notification.ReminderRequest 繼承的方法 |
---|
compareTo, equals, getContent, getExpiredContent, getNotificationId, getRingDuration, getSlotId, getSnoozeContent, getSnoozeTimes, getTimeInterval, getTitle, hashCode, setActionButton, setContent, setExpiredContent, setIntentAgent, setMaxScreenIntentAgent, setNotificationId, setRingDuration, setSlotId, setSnoozeContent, setSnoozeTimes, setTimeInterval, setTitle, toString |
從接口 ohos.utils.Sequenceable 繼承的方法 |
---|
hasFileDescriptor |
public ReminderRequestCalendar(LocalDateTime dateTime, int[] repeatMonths, int[] repeatDays)
用于創(chuàng)建 ReminderRequestCalendar 實(shí)例的構(gòu)造函數(shù)。 日歷事件提醒將在指定時(shí)間觸發(fā)。
確保輸入?yún)?shù)滿足以下要求。 否則,應(yīng)用程序可能會(huì)因?yàn)榉欠▍?shù)異常而崩潰。
參數(shù):
參數(shù)名稱(chēng) | 參數(shù)描述 |
---|---|
dateTime | 指示將觸發(fā)此日歷事件提醒的日期和時(shí)間。 時(shí)間精確到分鐘。 例如,LocalDateTime.of(2021, 3, 3, 16, 15) 的值表示提醒將在 2021 年 3 月 3 日 16:15 觸發(fā)。 |
repeatMonths | 指示重復(fù)此提醒的月份。 例如,值 {2, 4} 表示提醒將在 2 月和 4 月的特定日期觸發(fā)。 |
repeatDays | 指示每月重復(fù)此提醒的日期。 例如,值 {2, 4} 表示將在特定月份的第二天和第四天觸發(fā)提醒。 必須同時(shí)設(shè)置repeatMonths 和repeatDays 參數(shù)才能實(shí)現(xiàn)重復(fù)提醒。 默認(rèn)情況下,此提醒不會(huì)被延后。 您可以調(diào)用 ReminderRequest.setTimeInterval(long) 來(lái)設(shè)置貪睡間隔。 如果設(shè)置了打盹間隔,該提醒會(huì)默認(rèn)打盹3次。 您可以調(diào)用 ReminderRequest.setSnoozeTimes(int) 來(lái)更改貪睡時(shí)間。 |
Since:
6
public boolean marshalling(Parcel out)
從接口復(fù)制的描述:Sequenceable
將此 Sequenceable 對(duì)象編組為 Parcel。
指定者:
接口 Sequenceable 中的編組
覆蓋:
在類(lèi) ReminderRequest 中編組
參數(shù):
參數(shù)名稱(chēng) | 參數(shù)描述 |
---|---|
out | 指示將 Sequenceable 對(duì)象編組到的 Parcel 對(duì)象。 |
返回:
如果編組成功,則返回 true; 否則返回 false。
public boolean unmarshalling(Parcel in)
從接口復(fù)制的描述:Sequenceable
從 Parcel 中解組此 Sequenceable 對(duì)象。
指定者:
在接口 Sequenceable 中解組
覆蓋:
在 ReminderRequest 類(lèi)中解組
參數(shù):
參數(shù)名稱(chēng) | 參數(shù)描述 |
---|---|
in | 指示已將 Sequenceable 對(duì)象編組到的 Parcel 對(duì)象。 |
返回:
如果解組成功,則返回 true; 否則返回 false。
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: