鴻蒙OS ReminderRequestTimer

2022-10-13 10:30 更新

ReminderRequestTimer

java.lang.Object

|---ohos.event.notification.ReminderRequest

|---|---ohos.event.notification.ReminderRequestTimer

public class ReminderRequestTimer
extends ReminderRequest

用于為倒計(jì)時(shí)計(jì)時(shí)器創(chuàng)建提醒的 ReminderRequest 子類。

Since:

6

嵌套類摘要

從接口 ohos.utils.Sequenceable 繼承的嵌套類/接口
Sequenceable.ProducerT

字段摘要

從類 ohos.event.notification.ReminderRequest 繼承的字段
ACTION_BUTTON_TYPE_CLOSE, ACTION_BUTTON_TYPE_SNOOZE

構(gòu)造函數(shù)摘要

構(gòu)造函數(shù) 描述
ReminderRequestTimer(long countDownTimeInSeconds) 用于創(chuàng)建 ReminderRequestTimer 實(shí)例的構(gòu)造函數(shù)。

方法總結(jié)

修飾符和類型 方法 描述
boolean marshalling(Parcel out) 將此 Sequenceable 對(duì)象編組為 Parcel。
ReminderRequest setTimeInterval(long timeIntervalInSeconds) 設(shè)置此提醒的貪睡間隔,以秒為單位。
boolean unmarshalling(Parcel in) 從 Parcel 中解組此 Sequenceable 對(duì)象。
從類 java.lang.Object 繼承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
從類 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, setTitle, toString
從接口 ohos.utils.Sequenceable 繼承的方法
hasFileDescriptor

構(gòu)造函數(shù)詳細(xì)信息

ReminderRequestTimer

public ReminderRequestTimer(long countDownTimeInSeconds)

用于創(chuàng)建 ReminderRequestTimer 實(shí)例的構(gòu)造函數(shù)。 倒計(jì)時(shí)提醒將在指定的持續(xù)時(shí)間后觸發(fā)。

確保輸入?yún)?shù)滿足以下要求。 否則,應(yīng)用程序可能會(huì)因?yàn)榉欠▍?shù)異常而崩潰。

  • triggerTimeInSeconds 的值必須大于 0。

參數(shù):

參數(shù)名稱 參數(shù)描述
countDownTimeInSeconds 指示將觸發(fā)此計(jì)時(shí)器提醒的持續(xù)時(shí)間。

Since:

6

方法詳情

setTimeInterval

public ReminderRequest setTimeInterval(long timeIntervalInSeconds)

從類中復(fù)制的描述:ReminderRequest

設(shè)置此提醒的貪睡間隔,以秒為單位。 默認(rèn)值為 0。

  1. 最小貪睡間隔為 5 分鐘。 如果貪睡間隔設(shè)置為大于 0 且小于 5 分鐘的值,系統(tǒng)默認(rèn)將其轉(zhuǎn)換為 5 分鐘。
  2. 該方法對(duì) ReminderRequestTimer 不生效
以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)