AlarmManager的Constant值

本文介绍了Android系统中用于设置定时任务的各种常量及其用途。包括不同类型的定时触发方式、间隔时间设定等关键参数。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Constants
ACTION_NEXT_ALARM_CLOCK_CHANGED
added in API level 21

String ACTION_NEXT_ALARM_CLOCK_CHANGED

Broadcast Action: Sent after the value returned by getNextAlarmClock() has changed.

This is a protected intent that can only be sent by the system. It is only sent to registered receivers.

Constant Value: “android.app.action.NEXT_ALARM_CLOCK_CHANGED”
ELAPSED_REALTIME
added in API level 1

int ELAPSED_REALTIME

Alarm time in SystemClock.elapsedRealtime() (time since boot, including sleep). This alarm does not wake the device up; if it goes off while the device is asleep, it will not be delivered until the next time the device wakes up.

Constant Value: 3 (0x00000003)
ELAPSED_REALTIME_WAKEUP
added in API level 1

int ELAPSED_REALTIME_WAKEUP

Alarm time in SystemClock.elapsedRealtime() (time since boot, including sleep), which will wake up the device when it goes off.

Constant Value: 2 (0x00000002)
INTERVAL_DAY
added in API level 3

long INTERVAL_DAY

Available inexact recurrence interval recognized by setInexactRepeating(int, long, long, PendingIntent) when running on Android prior to API 19.

Constant Value: 86400000 (0x0000000005265c00)
INTERVAL_FIFTEEN_MINUTES
added in API level 3

long INTERVAL_FIFTEEN_MINUTES

Available inexact recurrence interval recognized by setInexactRepeating(int, long, long, PendingIntent) when running on Android prior to API 19.

Constant Value: 900000 (0x00000000000dbba0)
INTERVAL_HALF_DAY
added in API level 3

long INTERVAL_HALF_DAY

Available inexact recurrence interval recognized by setInexactRepeating(int, long, long, PendingIntent) when running on Android prior to API 19.

Constant Value: 43200000 (0x0000000002932e00)
INTERVAL_HALF_HOUR
added in API level 3

long INTERVAL_HALF_HOUR

Available inexact recurrence interval recognized by setInexactRepeating(int, long, long, PendingIntent) when running on Android prior to API 19.

Constant Value: 1800000 (0x00000000001b7740)
INTERVAL_HOUR
added in API level 3

long INTERVAL_HOUR

Available inexact recurrence interval recognized by setInexactRepeating(int, long, long, PendingIntent) when running on Android prior to API 19.

Constant Value: 3600000 (0x000000000036ee80)
RTC
added in API level 1

int RTC

Alarm time in System.currentTimeMillis() (wall clock time in UTC). This alarm does not wake the device up; if it goes off while the device is asleep, it will not be delivered until the next time the device wakes up.

Constant Value: 1 (0x00000001)
RTC_WAKEUP
added in API level 1

int RTC_WAKEUP

Alarm time in System.currentTimeMillis() (wall clock time in UTC), which will wake up the device when it goes off.

Constant Value: 0 (0x00000000)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值