Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/provider/AlarmClock#constants) \| [Ctors](https://developer.android.com/reference/android/provider/AlarmClock#pubctors) \| [Inherited Methods](https://developer.android.com/reference/android/provider/AlarmClock#inhmethods)

# AlarmClock

*** ** * ** ***


`
public

final

class
AlarmClock
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.provider.AlarmClock |

<br />

*** ** * ** ***

The AlarmClock provider contains an Intent action and extras that can be used
to start an Activity to set a new alarm or timer in an alarm clock application.

Applications that wish to receive the ACTION_SET_ALARM, ACTION_SET_TIMER,
ACTION_DISMISS_ALARM, ACTION_DISMISS_TIMER, and ACTION_SNOOZE_ALARM Intents
should create an activity to handle the Intent that
requires the permission, com.android.alarm.permission.SET_ALARM.
Applications that wish to create a
new alarm or timer should use
`https://developer.android.com/reference/android/content/Context#startActivity(android.content.Intent)` so that
the user has the option of choosing which alarm clock application to use.

Android TV devices may not support the alarm intents.

## Summary

| ### Constants ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_DISMISS_ALARM` Activity Action: Dismiss an alarm. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_DISMISS_TIMER` Activity Action: Dismiss a timer. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SET_ALARM` Activity Action: Set an alarm. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SET_TIMER` Activity Action: Set a timer. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SHOW_ALARMS` Activity Action: Show the alarms. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SHOW_TIMERS` Activity Action: Show the timers. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SNOOZE_ALARM` Activity Action: Snooze a currently ringing alarm. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/AlarmClock#ALARM_SEARCH_MODE_ALL` Selects all alarms. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/AlarmClock#ALARM_SEARCH_MODE_LABEL` Search by alarm label. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/AlarmClock#ALARM_SEARCH_MODE_NEXT` Selects the alarm that will ring next, or the alarm that is currently ringing, if any. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/AlarmClock#ALARM_SEARCH_MODE_TIME` Search for the alarm that is most closely matched by the search parameters `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_HOUR`, `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_MINUTES`, `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_IS_PM`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_ALARM_SEARCH_MODE` Bundle extra: Specify the type of search mode to look up an alarm. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_ALARM_SNOOZE_DURATION` Bundle extra: The snooze duration of the alarm in minutes. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_DAYS` Bundle extra: Weekdays for repeating alarm. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_HOUR` Bundle extra: The hour of the alarm. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_IS_PM` Bundle extra: The AM/PM of the alarm. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_LENGTH` Bundle extra: The length of the timer in seconds. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_MESSAGE` Bundle extra: A custom message for the alarm or timer. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_MINUTES` Bundle extra: The minutes of the alarm. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_RINGTONE` Bundle extra: A ringtone to be played with this alarm. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_SKIP_UI` Bundle extra: Whether or not to display an activity after performing the action. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_VIBRATE` Bundle extra: Whether or not to activate the device vibrator. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/AlarmClock#VALUE_RINGTONE_SILENT` Bundle extra value: Indicates no ringtone should be played. |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/provider/AlarmClock#AlarmClock()() ` |

### Inherited methods

From class `

https://developer.android.com/reference/java/lang/Object

` `


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Object#clone()()
`

Creates and returns a copy of this object.


`


boolean` `
https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj)
`

Indicates whether some other object is "equal to" this one.


`


void` `
https://developer.android.com/reference/java/lang/Object#finalize()()
`

Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.


`


final

https://developer.android.com/reference/java/lang/Class<?>` `
https://developer.android.com/reference/java/lang/Object#getClass()()
`

Returns the runtime class of this `Object`.


`


int` `
https://developer.android.com/reference/java/lang/Object#hashCode()()
`

Returns a hash code value for the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notify()()
`

Wakes up a single thread that is waiting on this object's
monitor.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notifyAll()()
`

Wakes up all threads that are waiting on this object's monitor.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Object#toString()()
`

Returns a string representation of the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait()()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


## Constants

### ACTION_DISMISS_ALARM

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String ACTION_DISMISS_ALARM
```

Activity Action: Dismiss an alarm.


The alarm to dismiss can be specified or searched for in one of the following ways:

1. The Intent's data URI, which represents a deeplink to the alarm.
2. The extra `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_ALARM_SEARCH_MODE` to determine how to search for the alarm.

<br />


If neither of the above are given then:

- If exactly one active alarm exists, it is dismissed.
- If more than one active alarm exists, the user is prompted to choose the alarm to dismiss.

<br />


If the extra `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_ALARM_SEARCH_MODE` is used, and the search results contain two or
more matching alarms, then the implementation should show an UI with the results and allow
the user to select the alarm to dismiss. If the implementation supports
`https://developer.android.com/reference/android/content/Intent#CATEGORY_VOICE` and the activity is started in Voice
Interaction mode (i.e. check `https://developer.android.com/reference/android/app/Activity#isVoiceInteraction()`), then the
implementation should additionally use `https://developer.android.com/reference/android/app/VoiceInteractor.PickOptionRequest`
to start a voice interaction follow-on flow to help the user disambiguate the alarm by voice.


If the specified alarm is a single occurrence alarm, then dismissing it effectively disables
the alarm; it will never ring again unless explicitly re-enabled.


If the specified alarm is a repeating alarm, then dismissing it only prevents the upcoming
instance from ringing. The alarm remains enabled so that it will still ring on the date and
time of the next instance (i.e. the instance after the upcoming one).

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_ALARM_SEARCH_MODE`

Constant Value:

"android.intent.action.DISMISS_ALARM"


### ACTION_DISMISS_TIMER

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String ACTION_DISMISS_TIMER
```

Activity Action: Dismiss a timer.


The timer to dismiss should be specified using the Intent's data URI, which represents a
deeplink to the timer.


If no data URI is provided, dismiss all expired timers.


This intent requires the `https://developer.android.com/reference/android/Manifest.permission#SET_ALARM` permission.

<br />

<br />

Constant Value:

"android.intent.action.DISMISS_TIMER"


### ACTION_SET_ALARM

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String ACTION_SET_ALARM
```

Activity Action: Set an alarm.


Activates an existing alarm or creates a new one.


This action requests an alarm to be set for a given time of day. If no time of day is
specified, an implementation should start an activity that is capable of setting an alarm
(`https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_SKIP_UI` is ignored in this case). If a time of day is specified, and
`https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_SKIP_UI` is `true`, and the alarm is not repeating, the implementation
should remove this alarm after it has been dismissed. If an identical alarm exists matching
all parameters, the implementation may re-use it instead of creating a new one (in this case,
the alarm should not be removed after dismissal).


This action always enables the alarm.


This activity could also be started in Voice Interaction mode. The activity should check
`https://developer.android.com/reference/android/app/Activity#isVoiceInteraction()`, and if true, the implementation should
report a deeplink of the created/enabled alarm using
`https://developer.android.com/reference/android/app/VoiceInteractor.CompleteVoiceRequest`. This allows follow-on voice actions
such as `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_DISMISS_ALARM` to dismiss the alarm that was just enabled.

### Request parameters

- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_HOUR` *(optional)*: The hour of the alarm being set.
- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_MINUTES` *(optional)*: The minutes of the alarm being set.
- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_DAYS` *(optional)*: Weekdays for repeating alarm.
- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_MESSAGE` *(optional)*: A custom message for the alarm.
- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_RINGTONE` *(optional)*: A ringtone to play with this alarm.
- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_VIBRATE` *(optional)*: Whether or not to activate the device vibrator for this alarm.
- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_SKIP_UI` *(optional)*: Whether or not to display an activity for setting this alarm.

<br />

<br />

Constant Value:

"android.intent.action.SET_ALARM"


### ACTION_SET_TIMER

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String ACTION_SET_TIMER
```

Activity Action: Set a timer.


Activates an existing timer or creates a new one.


This action requests a timer to be started for a specific `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_LENGTH` of
time. If no `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_LENGTH` is specified, the implementation should start an
activity that is capable of setting a timer (`https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_SKIP_UI` is ignored in this case).
If a `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_LENGTH` is specified, and `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_SKIP_UI` is `true`,
the implementation should remove this timer after it has been dismissed. If an identical,
unused timer exists matching both parameters, an implementation may re-use it instead of
creating a new one (in this case, the timer should not be removed after dismissal).

This action always starts the timer.

### Request parameters

- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_LENGTH` *(optional)*: The length of the timer being set.
- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_MESSAGE` *(optional)*: A custom message for the timer.
- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_SKIP_UI` *(optional)*: Whether or not to display an activity for setting this timer.


This intent requires the `https://developer.android.com/reference/android/Manifest.permission#SET_ALARM` permission.

<br />

<br />

Constant Value:

"android.intent.action.SET_TIMER"


### ACTION_SHOW_ALARMS

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String ACTION_SHOW_ALARMS
```

Activity Action: Show the alarms.


This action opens the alarms page.

<br />

<br />

Constant Value:

"android.intent.action.SHOW_ALARMS"


### ACTION_SHOW_TIMERS

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String ACTION_SHOW_TIMERS
```

Activity Action: Show the timers.


This action opens the timers page.

<br />

<br />

Constant Value:

"android.intent.action.SHOW_TIMERS"


### ACTION_SNOOZE_ALARM

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String ACTION_SNOOZE_ALARM
```

Activity Action: Snooze a currently ringing alarm.


Snoozes the currently ringing alarm. The extra `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_ALARM_SNOOZE_DURATION` can be
optionally set to specify the snooze duration; if unset, the implementation should use a
reasonable default, for example 10 minutes. The alarm should ring again after the snooze
duration.

Any application that wants to use this action should also be granted the
`https://developer.android.com/reference/android/Manifest.permission#SET_ALARM` permission.


Note: setting the extra `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_ALARM_SNOOZE_DURATION` does not change the default
snooze duration; it's only applied to the currently ringing alarm.


If there is no currently ringing alarm, then this is a no-op.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_ALARM_SNOOZE_DURATION`

Constant Value:

"android.intent.action.SNOOZE_ALARM"


### ALARM_SEARCH_MODE_ALL

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String ALARM_SEARCH_MODE_ALL
```

Selects all alarms.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_ALARM_SEARCH_MODE`

Constant Value:

"android.all"


### ALARM_SEARCH_MODE_LABEL

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String ALARM_SEARCH_MODE_LABEL
```

Search by alarm label. Should return alarms that contain the word or phrase in given label.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_ALARM_SEARCH_MODE`

Constant Value:

"android.label"


### ALARM_SEARCH_MODE_NEXT

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String ALARM_SEARCH_MODE_NEXT
```

Selects the alarm that will ring next, or the alarm that is currently ringing, if any.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_ALARM_SEARCH_MODE`

Constant Value:

"android.next"


### ALARM_SEARCH_MODE_TIME

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String ALARM_SEARCH_MODE_TIME
```

Search for the alarm that is most closely matched by the search parameters
`https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_HOUR`, `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_MINUTES`, `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_IS_PM`.
In this search mode, at least one of these additional extras are required.

- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_HOUR` - The hour to search for the alarm.
- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_MINUTES` - The minute to search for the alarm.
- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_IS_PM` - Whether the hour is AM or PM.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_ALARM_SEARCH_MODE`

Constant Value:

"android.time"


### EXTRA_ALARM_SEARCH_MODE

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_ALARM_SEARCH_MODE
```

Bundle extra: Specify the type of search mode to look up an alarm.


For example, used by `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_DISMISS_ALARM` to identify the alarm to dismiss.


This extra is only used when the alarm is not already identified by a deeplink as
specified in the Intent's data URI.


The value of this extra is a `https://developer.android.com/reference/java/lang/String`, restricted to the following set of supported
search modes:

- *Time* - `https://developer.android.com/reference/android/provider/AlarmClock#ALARM_SEARCH_MODE_TIME`: Selects the alarm that is most closely matched by the search parameters `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_HOUR`, `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_MINUTES`, `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_IS_PM`.
- *Next alarm* - `https://developer.android.com/reference/android/provider/AlarmClock#ALARM_SEARCH_MODE_NEXT`: Selects the alarm that will ring next, or the alarm that is currently ringing, if any.
- *All alarms* - `https://developer.android.com/reference/android/provider/AlarmClock#ALARM_SEARCH_MODE_ALL`: Selects all alarms.
- *Label* - `https://developer.android.com/reference/android/provider/AlarmClock#ALARM_SEARCH_MODE_LABEL`: Search by alarm label. Should return alarms that contain the word or phrase in given label.

<br />

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/AlarmClock#ALARM_SEARCH_MODE_TIME`
- `https://developer.android.com/reference/android/provider/AlarmClock#ALARM_SEARCH_MODE_NEXT`
- `https://developer.android.com/reference/android/provider/AlarmClock#ALARM_SEARCH_MODE_ALL`
- `https://developer.android.com/reference/android/provider/AlarmClock#ALARM_SEARCH_MODE_LABEL`
- `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_DISMISS_ALARM`

Constant Value:

"android.intent.extra.alarm.SEARCH_MODE"


### EXTRA_ALARM_SNOOZE_DURATION

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_ALARM_SNOOZE_DURATION
```

Bundle extra: The snooze duration of the alarm in minutes.


Used by `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SNOOZE_ALARM`. This extra is optional and the value is an
`https://developer.android.com/reference/java/lang/Integer` that specifies the duration in minutes for which to snooze the alarm.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SNOOZE_ALARM`

Constant Value:

"android.intent.extra.alarm.SNOOZE_DURATION"


### EXTRA_DAYS

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_DAYS
```

Bundle extra: Weekdays for repeating alarm.


Used by `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SET_ALARM`.


The value is an `ArrayList<Integer>`. Each item can be:

- `https://developer.android.com/reference/java/util/Calendar#SUNDAY`,
- `https://developer.android.com/reference/java/util/Calendar#MONDAY`,
- `https://developer.android.com/reference/java/util/Calendar#TUESDAY`,
- `https://developer.android.com/reference/java/util/Calendar#WEDNESDAY`,
- `https://developer.android.com/reference/java/util/Calendar#THURSDAY`,
- `https://developer.android.com/reference/java/util/Calendar#FRIDAY`,
- `https://developer.android.com/reference/java/util/Calendar#SATURDAY`

<br />

<br />

Constant Value:

"android.intent.extra.alarm.DAYS"


### EXTRA_HOUR

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_HOUR
```

Bundle extra: The hour of the alarm.


Used by `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SET_ALARM`.


This extra is optional. If not provided, an implementation should open an activity
that allows a user to set an alarm with user provided time.


The value is an `https://developer.android.com/reference/java/lang/Integer` and ranges from 0 to 23.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SET_ALARM`
- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_MINUTES`
- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_DAYS`

Constant Value:

"android.intent.extra.alarm.HOUR"


### EXTRA_IS_PM

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_IS_PM
```

Bundle extra: The AM/PM of the alarm.


Used by `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_DISMISS_ALARM`.


This extra is optional and only used when `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_ALARM_SEARCH_MODE` is set to
`https://developer.android.com/reference/android/provider/AlarmClock#ALARM_SEARCH_MODE_TIME`. In this search mode, the `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_IS_PM` is
used together with `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_HOUR` and `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_MINUTES`. The implementation should
look up the alarm that is most closely matched by these search parameters.
If `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_IS_PM` is missing, then the AM/PM of the specified `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_HOUR` is
ambiguous and the implementation should ask for clarification from the user.


The value is a `https://developer.android.com/reference/java/lang/Boolean`, where false=AM and true=PM.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_DISMISS_ALARM`
- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_HOUR`
- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_MINUTES`

Constant Value:

"android.intent.extra.alarm.IS_PM"


### EXTRA_LENGTH

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_LENGTH
```

Bundle extra: The length of the timer in seconds.


Used by `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SET_TIMER`.


This extra is optional. If not provided, an implementation should open an activity
that allows a user to set a timer with user provided length.


The value is an `https://developer.android.com/reference/java/lang/Integer` and ranges from 1 to 86400 (24 hours).

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SET_TIMER`

Constant Value:

"android.intent.extra.alarm.LENGTH"


### EXTRA_MESSAGE

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_MESSAGE
```

Bundle extra: A custom message for the alarm or timer.


Used by `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SET_ALARM` and `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SET_TIMER`.


The value is a `https://developer.android.com/reference/java/lang/String`.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SET_ALARM`
- `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SET_TIMER`

Constant Value:

"android.intent.extra.alarm.MESSAGE"


### EXTRA_MINUTES

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_MINUTES
```

Bundle extra: The minutes of the alarm.


Used by `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SET_ALARM`.


The value is an `https://developer.android.com/reference/java/lang/Integer` and ranges from 0 to 59. If not provided, it defaults to 0.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SET_ALARM`
- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_HOUR`
- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_DAYS`

Constant Value:

"android.intent.extra.alarm.MINUTES"


### EXTRA_RINGTONE

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_RINGTONE
```

Bundle extra: A ringtone to be played with this alarm.


Used by `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SET_ALARM`.


This value is a `https://developer.android.com/reference/java/lang/String` and can either be set to `https://developer.android.com/reference/android/provider/AlarmClock#VALUE_RINGTONE_SILENT` or
to a content URI of the media to be played. If not specified or the URI doesn't exist,
`"content://settings/system/alarm_alert` will be used.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SET_ALARM`
- `https://developer.android.com/reference/android/provider/AlarmClock#VALUE_RINGTONE_SILENT`
- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_VIBRATE`

Constant Value:

"android.intent.extra.alarm.RINGTONE"


### EXTRA_SKIP_UI

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_SKIP_UI
```

Bundle extra: Whether or not to display an activity after performing the action.


Used by `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SET_ALARM` and `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SET_TIMER`.


If true, the application is asked to bypass any intermediate UI. If false, the application
may display intermediate UI like a confirmation dialog or settings.


The value is a `https://developer.android.com/reference/java/lang/Boolean`. The default is `false`.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SET_ALARM`
- `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SET_TIMER`

Constant Value:

"android.intent.extra.alarm.SKIP_UI"


### EXTRA_VIBRATE

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_VIBRATE
```

Bundle extra: Whether or not to activate the device vibrator.


Used by `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SET_ALARM`.


The value is a `https://developer.android.com/reference/java/lang/Boolean`. The default is `true`.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SET_ALARM`
- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_RINGTONE`
- `https://developer.android.com/reference/android/provider/AlarmClock#VALUE_RINGTONE_SILENT`

Constant Value:

"android.intent.extra.alarm.VIBRATE"


### VALUE_RINGTONE_SILENT

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String VALUE_RINGTONE_SILENT
```

Bundle extra value: Indicates no ringtone should be played.


Used by `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SET_ALARM`, passed in through `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_RINGTONE`.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/AlarmClock#ACTION_SET_ALARM`
- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_RINGTONE`
- `https://developer.android.com/reference/android/provider/AlarmClock#EXTRA_VIBRATE`

Constant Value:

"silent"


## Public constructors

### AlarmClock

```
public AlarmClock ()
```

<br />

<br />