Most visited

Recently visited

Added in API level 21

AlarmManager.AlarmClockInfo

public static final class AlarmManager.AlarmClockInfo
extends Object implements Parcelable

java.lang.Object
   ↳ android.app.AlarmManager.AlarmClockInfo


定时“闹钟”事件的不可变描述。

也可以看看:

Summary

Inherited constants

From interface android.os.Parcelable

Fields

public static final Creator<AlarmManager.AlarmClockInfo> CREATOR

Public constructors

AlarmManager.AlarmClockInfo(long triggerTime, PendingIntent showIntent)

创建新的闹钟描述。

Public methods

int describeContents()

描述此Parcelable实例的封送表示中包含的特殊对象的种类。

PendingIntent getShowIntent()

返回可用于显示或编辑计划它的应用程序中闹钟详细信息的意图。

long getTriggerTime()

返回警报将要触发的时间。

void writeToParcel(Parcel dest, int flags)

将此对象平铺到一个包裹中。

Inherited methods

From class java.lang.Object
From interface android.os.Parcelable

Fields

Public constructors

AlarmManager.AlarmClockInfo

Added in API level 21
AlarmManager.AlarmClockInfo (long triggerTime, 
                PendingIntent showIntent)

创建新的闹钟描述。

Parameters
triggerTime long: time at which the underlying alarm is triggered in wall time milliseconds since the epoch
showIntent PendingIntent: an intent that can be used to show or edit details of the alarm clock.

Public methods

describeContents

Added in API level 21
int describeContents ()

描述此Parcelable实例的封送表示中包含的特殊对象的种类。 例如,如果对象将在writeToParcel(Parcel, int)的输出中包含writeToParcel(Parcel, int) ,则此方法的返回值必须包含CONTENTS_FILE_DESCRIPTOR位。

Returns
int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.

getShowIntent

Added in API level 21
PendingIntent getShowIntent ()

返回可用于显示或编辑计划它的应用程序中闹钟详细信息的意图。

请注意,任何应用程序都可以检索并发送此意向,可能会填写其他字段。有关详细信息,请参阅 PendingIntent.send()Intent.fillIn()

Returns
PendingIntent

getTriggerTime

Added in API level 21
long getTriggerTime ()

返回警报将要触发的时间。 该值是以毫秒为单位的UTC挂钟时间,例如currentTimeMillis()

Returns
long

writeToParcel

Added in API level 21
void writeToParcel (Parcel dest, 
                int flags)

将此对象平铺到一个包裹中。

Parameters
dest Parcel: The Parcel in which the object should be written.
flags int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.

Hooray!