blob: 7ad9e013c61718371c65d2eaf7fd30f482b8dd3e [file] [log] [blame]
Patrick Scotta73c4b02010-09-22 08:16:53 -04001/*
2 * Copyright (C) 2010 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.provider;
18
19import android.annotation.SdkConstant;
20import android.annotation.SdkConstant.SdkConstantType;
21
22/**
23 * The AlarmClock provider contains an Intent action and extras that can be used
Sam Blitzstein435e7df2013-08-16 17:31:20 -070024 * to start an Activity to set a new alarm or timer in an alarm clock application.
Patrick Scotta73c4b02010-09-22 08:16:53 -040025 *
Sam Blitzstein435e7df2013-08-16 17:31:20 -070026 * Applications that wish to receive the ACTION_SET_ALARM and ACTION_SET_TIMER Intents
27 * should create an activity to handle the Intent that requires the permission
Patrick Scotta73c4b02010-09-22 08:16:53 -040028 * com.android.alarm.permission.SET_ALARM. Applications that wish to create a
Sam Blitzstein435e7df2013-08-16 17:31:20 -070029 * new alarm or timer should use
Patrick Scotta73c4b02010-09-22 08:16:53 -040030 * {@link android.content.Context#startActivity Context.startActivity()} so that
31 * the user has the option of choosing which alarm clock application to use.
Daniel Cardenas4ff933a2017-03-31 16:29:11 -070032 *
33 * Android TV devices may not support the alarm intents.
Patrick Scotta73c4b02010-09-22 08:16:53 -040034 */
35public final class AlarmClock {
36 /**
37 * Activity Action: Set an alarm.
38 * <p>
Sam Blitzstein435e7df2013-08-16 17:31:20 -070039 * Activates an existing alarm or creates a new one.
40 * </p><p>
Sam Blitzstein229ba492013-08-28 11:42:05 -070041 * This action requests an alarm to be set for a given time of day. If no time of day is
42 * specified, an implementation should start an activity that is capable of setting an alarm
43 * ({@link #EXTRA_SKIP_UI} is ignored in this case). If a time of day is specified, and
44 * {@link #EXTRA_SKIP_UI} is {@code true}, and the alarm is not repeating, the implementation
45 * should remove this alarm after it has been dismissed. If an identical alarm exists matching
46 * all parameters, the implementation may re-use it instead of creating a new one (in this case,
47 * the alarm should not be removed after dismissal).
Johnson Hsieh633bf5c2015-04-01 01:33:31 -070048 * </p><p>
Sam Blitzstein229ba492013-08-28 11:42:05 -070049 * This action always enables the alarm.
Johnson Hsieh633bf5c2015-04-01 01:33:31 -070050 * </p><p>
51 * This activity could also be started in Voice Interaction mode. The activity should check
52 * {@link android.app.Activity#isVoiceInteraction}, and if true, the implementation should
53 * report a deeplink of the created/enabled alarm using
54 * {@link android.app.VoiceInteractor.CompleteVoiceRequest}. This allows follow-on voice actions
Johnson Hsieh1ef714a2015-06-01 17:55:07 -070055 * such as {@link #ACTION_DISMISS_ALARM} to dismiss the alarm that was just enabled.
Sam Blitzstein435e7df2013-08-16 17:31:20 -070056 * </p>
57 * <h3>Request parameters</h3>
58 * <ul>
59 * <li>{@link #EXTRA_HOUR} <em>(optional)</em>: The hour of the alarm being set.
60 * <li>{@link #EXTRA_MINUTES} <em>(optional)</em>: The minutes of the alarm being set.
61 * <li>{@link #EXTRA_DAYS} <em>(optional)</em>: Weekdays for repeating alarm.
62 * <li>{@link #EXTRA_MESSAGE} <em>(optional)</em>: A custom message for the alarm.
63 * <li>{@link #EXTRA_RINGTONE} <em>(optional)</em>: A ringtone to play with this alarm.
64 * <li>{@link #EXTRA_VIBRATE} <em>(optional)</em>: Whether or not to activate the device
65 * vibrator for this alarm.
66 * <li>{@link #EXTRA_SKIP_UI} <em>(optional)</em>: Whether or not to display an activity for
67 * setting this alarm.
Sam Blitzstein435e7df2013-08-16 17:31:20 -070068 * </ul>
Patrick Scotta73c4b02010-09-22 08:16:53 -040069 */
70 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
71 public static final String ACTION_SET_ALARM = "android.intent.action.SET_ALARM";
72
73 /**
Johnson Hsieh1ef714a2015-06-01 17:55:07 -070074 * Activity Action: Dismiss an alarm.
Johnson Hsieh633bf5c2015-04-01 01:33:31 -070075 * <p>
Johnson Hsieh1ef714a2015-06-01 17:55:07 -070076 * The alarm to dismiss can be specified or searched for in one of the following ways:
Johnson Hsieh633bf5c2015-04-01 01:33:31 -070077 * <ol>
Johnson Hsieh1ef714a2015-06-01 17:55:07 -070078 * <li>The Intent's data URI, which represents a deeplink to the alarm.
79 * <li>The extra {@link #EXTRA_ALARM_SEARCH_MODE} to determine how to search for the alarm.
80 * </ol>
81 * </p><p>
82 * If neither of the above are given then:
83 * <ul>
84 * <li>If exactly one active alarm exists, it is dismissed.
Christine Franksc99c0e22017-06-13 15:26:09 -070085 * <li>If more than one active alarm exists, the user is prompted to choose the alarm to
86 * dismiss.
Johnson Hsieh1ef714a2015-06-01 17:55:07 -070087 * </ul>
88 * </p><p>
89 * If the extra {@link #EXTRA_ALARM_SEARCH_MODE} is used, and the search results contain two or
90 * more matching alarms, then the implementation should show an UI with the results and allow
91 * the user to select the alarm to dismiss. If the implementation supports
Johnson Hsiehbcc1ff62015-06-04 19:51:27 -070092 * {@link android.content.Intent#CATEGORY_VOICE} and the activity is started in Voice
Johnson Hsieh1ef714a2015-06-01 17:55:07 -070093 * Interaction mode (i.e. check {@link android.app.Activity#isVoiceInteraction}), then the
94 * implementation should additionally use {@link android.app.VoiceInteractor.PickOptionRequest}
95 * to start a voice interaction follow-on flow to help the user disambiguate the alarm by voice.
96 * </p><p>
97 * If the specified alarm is a single occurrence alarm, then dismissing it effectively disables
98 * the alarm; it will never ring again unless explicitly re-enabled.
99 * </p><p>
100 * If the specified alarm is a repeating alarm, then dismissing it only prevents the upcoming
101 * instance from ringing. The alarm remains enabled so that it will still ring on the date and
102 * time of the next instance (i.e. the instance after the upcoming one).
103 * </p>
Johnson Hsieh633bf5c2015-04-01 01:33:31 -0700104 *
Johnson Hsieh633bf5c2015-04-01 01:33:31 -0700105 * @see #EXTRA_ALARM_SEARCH_MODE
106 */
107 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
Christine Franksc99c0e22017-06-13 15:26:09 -0700108 public static final String ACTION_DISMISS_ALARM = "android.intent.action.DISMISS_ALARM";
Johnson Hsieh633bf5c2015-04-01 01:33:31 -0700109
110 /**
Johnson Hsieh1ef714a2015-06-01 17:55:07 -0700111 * Activity Action: Snooze a currently ringing alarm.
Johnson Hsieh633bf5c2015-04-01 01:33:31 -0700112 * <p>
Johnson Hsieh1ef714a2015-06-01 17:55:07 -0700113 * Snoozes the currently ringing alarm. The extra {@link #EXTRA_ALARM_SNOOZE_DURATION} can be
114 * optionally set to specify the snooze duration; if unset, the implementation should use a
115 * reasonable default, for example 10 minutes. The alarm should ring again after the snooze
116 * duration.
Johnson Hsieh633bf5c2015-04-01 01:33:31 -0700117 * </p><p>
Johnson Hsieh1ef714a2015-06-01 17:55:07 -0700118 * Note: setting the extra {@link #EXTRA_ALARM_SNOOZE_DURATION} does not change the default
119 * snooze duration; it's only applied to the currently ringing alarm.
120 * </p><p>
121 * If there is no currently ringing alarm, then this is a no-op.
122 * </p>
Johnson Hsieh633bf5c2015-04-01 01:33:31 -0700123 *
Johnson Hsieh1ef714a2015-06-01 17:55:07 -0700124 * @see #EXTRA_ALARM_SNOOZE_DURATION
Johnson Hsieh633bf5c2015-04-01 01:33:31 -0700125 */
126 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
Christine Franksc99c0e22017-06-13 15:26:09 -0700127 public static final String ACTION_SNOOZE_ALARM = "android.intent.action.SNOOZE_ALARM";
Johnson Hsieh633bf5c2015-04-01 01:33:31 -0700128
129 /**
Sam Blitzstein435e7df2013-08-16 17:31:20 -0700130 * Activity Action: Set a timer.
Patrick Scotta73c4b02010-09-22 08:16:53 -0400131 * <p>
Sam Blitzstein435e7df2013-08-16 17:31:20 -0700132 * Activates an existing timer or creates a new one.
133 * </p><p>
134 * This action requests a timer to be started for a specific {@link #EXTRA_LENGTH length} of
Sam Blitzstein229ba492013-08-28 11:42:05 -0700135 * time. If no {@link #EXTRA_LENGTH length} is specified, the implementation should start an
136 * activity that is capable of setting a timer ({@link #EXTRA_SKIP_UI} is ignored in this case).
137 * If a {@link #EXTRA_LENGTH length} is specified, and {@link #EXTRA_SKIP_UI} is {@code true},
138 * the implementation should remove this timer after it has been dismissed. If an identical,
139 * unused timer exists matching both parameters, an implementation may re-use it instead of
140 * creating a new one (in this case, the timer should not be removed after dismissal).
141 *
142 * This action always starts the timer.
Sam Blitzstein435e7df2013-08-16 17:31:20 -0700143 * </p>
144 *
145 * <h3>Request parameters</h3>
146 * <ul>
147 * <li>{@link #EXTRA_LENGTH} <em>(optional)</em>: The length of the timer being set.
148 * <li>{@link #EXTRA_MESSAGE} <em>(optional)</em>: A custom message for the timer.
149 * <li>{@link #EXTRA_SKIP_UI} <em>(optional)</em>: Whether or not to display an activity for
150 * setting this timer.
Sam Blitzstein435e7df2013-08-16 17:31:20 -0700151 * </ul>
Patrick Scotta73c4b02010-09-22 08:16:53 -0400152 */
Sam Blitzstein435e7df2013-08-16 17:31:20 -0700153 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
154 public static final String ACTION_SET_TIMER = "android.intent.action.SET_TIMER";
Patrick Scotta73c4b02010-09-22 08:16:53 -0400155
156 /**
Christine Franksfa4939e2017-12-07 15:30:37 -0800157 * Activity Action: Dismiss a timer.
Christine Franksc99c0e22017-06-13 15:26:09 -0700158 * <p>
Christine Franksfa4939e2017-12-07 15:30:37 -0800159 * The timer to dismiss should be specified using the Intent's data URI, which represents a
160 * deeplink to the timer.
161 * </p><p>
162 * If no data URI is provided, dismiss all expired timers.
Christine Franksc99c0e22017-06-13 15:26:09 -0700163 * </p>
Christine Franksc99c0e22017-06-13 15:26:09 -0700164 */
165 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
166 public static final String ACTION_DISMISS_TIMER = "android.intent.action.DISMISS_TIMER";
167
168 /**
Sean Stout1ba3ac92016-12-05 14:05:03 -0800169 * Activity Action: Show the timers.
170 * <p>
171 * This action opens the timers page.
172 * </p>
173 */
174 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
175 public static final String ACTION_SHOW_TIMERS = "android.intent.action.SHOW_TIMERS";
176
177 /**
Sam Blitzstein2f7acd12013-08-28 15:44:03 -0700178 * Activity Action: Show the alarms.
179 * <p>
180 * This action opens the alarms page.
181 * </p>
182 */
183 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
184 public static final String ACTION_SHOW_ALARMS = "android.intent.action.SHOW_ALARMS";
185
186 /**
Johnson Hsieh633bf5c2015-04-01 01:33:31 -0700187 * Bundle extra: Specify the type of search mode to look up an alarm.
188 * <p>
Johnson Hsieh1ef714a2015-06-01 17:55:07 -0700189 * For example, used by {@link #ACTION_DISMISS_ALARM} to identify the alarm to dismiss.
Johnson Hsieh633bf5c2015-04-01 01:33:31 -0700190 * </p><p>
Johnson Hsieh1ef714a2015-06-01 17:55:07 -0700191 * This extra is only used when the alarm is not already identified by a deeplink as
Johnson Hsieh633bf5c2015-04-01 01:33:31 -0700192 * specified in the Intent's data URI.
193 * </p><p>
194 * The value of this extra is a {@link String}, restricted to the following set of supported
195 * search modes:
196 * <ul>
197 * <li><i>Time</i> - {@link #ALARM_SEARCH_MODE_TIME}: Selects the alarm that is most
198 * closely matched by the search parameters {@link #EXTRA_HOUR}, {@link #EXTRA_MINUTES},
199 * {@link #EXTRA_IS_PM}.
200 * <li><i>Next alarm</i> - {@link #ALARM_SEARCH_MODE_NEXT}: Selects the alarm that will
201 * ring next, or the alarm that is currently ringing, if any.
202 * <li><i>All alarms</i> - {@link #ALARM_SEARCH_MODE_ALL}: Selects all alarms.
Johnson Hsieh1ef714a2015-06-01 17:55:07 -0700203 * <li><i>Label</i> - {@link #ALARM_SEARCH_MODE_LABEL}: Search by alarm label. Should return
204 * alarms that contain the word or phrase in given label.
Johnson Hsieh633bf5c2015-04-01 01:33:31 -0700205 * </ul>
Johnson Hsieh1ef714a2015-06-01 17:55:07 -0700206 * </p>
Johnson Hsieh633bf5c2015-04-01 01:33:31 -0700207 *
208 * @see #ALARM_SEARCH_MODE_TIME
209 * @see #ALARM_SEARCH_MODE_NEXT
210 * @see #ALARM_SEARCH_MODE_ALL
Johnson Hsieh1ef714a2015-06-01 17:55:07 -0700211 * @see #ALARM_SEARCH_MODE_LABEL
212 * @see #ACTION_DISMISS_ALARM
Johnson Hsieh633bf5c2015-04-01 01:33:31 -0700213 */
Christine Franksc99c0e22017-06-13 15:26:09 -0700214 public static final String EXTRA_ALARM_SEARCH_MODE = "android.intent.extra.alarm.SEARCH_MODE";
Johnson Hsieh633bf5c2015-04-01 01:33:31 -0700215
216 /**
217 * Search for the alarm that is most closely matched by the search parameters
218 * {@link #EXTRA_HOUR}, {@link #EXTRA_MINUTES}, {@link #EXTRA_IS_PM}.
219 * In this search mode, at least one of these additional extras are required.
220 * <ul>
221 * <li>{@link #EXTRA_HOUR} - The hour to search for the alarm.
222 * <li>{@link #EXTRA_MINUTES} - The minute to search for the alarm.
223 * <li>{@link #EXTRA_IS_PM} - Whether the hour is AM or PM.
224 * </ul>
225 *
226 * @see #EXTRA_ALARM_SEARCH_MODE
227 */
Johnson Hsieh1ef714a2015-06-01 17:55:07 -0700228 public static final String ALARM_SEARCH_MODE_TIME = "android.time";
Johnson Hsieh633bf5c2015-04-01 01:33:31 -0700229
230 /**
231 * Selects the alarm that will ring next, or the alarm that is currently ringing, if any.
232 *
233 * @see #EXTRA_ALARM_SEARCH_MODE
234 */
Johnson Hsieh1ef714a2015-06-01 17:55:07 -0700235 public static final String ALARM_SEARCH_MODE_NEXT = "android.next";
Johnson Hsieh633bf5c2015-04-01 01:33:31 -0700236
237 /**
238 * Selects all alarms.
239 *
240 * @see #EXTRA_ALARM_SEARCH_MODE
241 */
Johnson Hsieh1ef714a2015-06-01 17:55:07 -0700242 public static final String ALARM_SEARCH_MODE_ALL = "android.all";
Johnson Hsieh633bf5c2015-04-01 01:33:31 -0700243
244 /**
Johnson Hsieh1ef714a2015-06-01 17:55:07 -0700245 * Search by alarm label. Should return alarms that contain the word or phrase in given label.
Johnson Hsieh633bf5c2015-04-01 01:33:31 -0700246 *
247 * @see #EXTRA_ALARM_SEARCH_MODE
248 */
Johnson Hsieh1ef714a2015-06-01 17:55:07 -0700249 public static final String ALARM_SEARCH_MODE_LABEL = "android.label";
Johnson Hsieh633bf5c2015-04-01 01:33:31 -0700250
251 /**
252 * Bundle extra: The AM/PM of the alarm.
253 * <p>
Johnson Hsieh1ef714a2015-06-01 17:55:07 -0700254 * Used by {@link #ACTION_DISMISS_ALARM}.
Johnson Hsieh633bf5c2015-04-01 01:33:31 -0700255 * </p><p>
256 * This extra is optional and only used when {@link #EXTRA_ALARM_SEARCH_MODE} is set to
257 * {@link #ALARM_SEARCH_MODE_TIME}. In this search mode, the {@link #EXTRA_IS_PM} is
258 * used together with {@link #EXTRA_HOUR} and {@link #EXTRA_MINUTES}. The implementation should
259 * look up the alarm that is most closely matched by these search parameters.
260 * If {@link #EXTRA_IS_PM} is missing, then the AM/PM of the specified {@link #EXTRA_HOUR} is
261 * ambiguous and the implementation should ask for clarification from the user.
262 * </p><p>
263 * The value is a {@link Boolean}, where false=AM and true=PM.
264 * </p>
265 *
Johnson Hsieh1ef714a2015-06-01 17:55:07 -0700266 * @see #ACTION_DISMISS_ALARM
Johnson Hsieh633bf5c2015-04-01 01:33:31 -0700267 * @see #EXTRA_HOUR
268 * @see #EXTRA_MINUTES
269 */
270 public static final String EXTRA_IS_PM = "android.intent.extra.alarm.IS_PM";
271
Johnson Hsieh1ef714a2015-06-01 17:55:07 -0700272
273 /**
274 * Bundle extra: The snooze duration of the alarm in minutes.
275 * <p>
276 * Used by {@link #ACTION_SNOOZE_ALARM}. This extra is optional and the value is an
277 * {@link Integer} that specifies the duration in minutes for which to snooze the alarm.
278 * </p>
279 *
280 * @see #ACTION_SNOOZE_ALARM
281 */
282 public static final String EXTRA_ALARM_SNOOZE_DURATION =
283 "android.intent.extra.alarm.SNOOZE_DURATION";
284
Johnson Hsieh633bf5c2015-04-01 01:33:31 -0700285 /**
Sam Blitzstein435e7df2013-08-16 17:31:20 -0700286 * Bundle extra: Weekdays for repeating alarm.
Patrick Scotta73c4b02010-09-22 08:16:53 -0400287 * <p>
Sam Blitzstein435e7df2013-08-16 17:31:20 -0700288 * Used by {@link #ACTION_SET_ALARM}.
289 * </p><p>
290 * The value is an {@code ArrayList<Integer>}. Each item can be:
291 * </p>
292 * <ul>
293 * <li> {@link java.util.Calendar#SUNDAY},
294 * <li> {@link java.util.Calendar#MONDAY},
295 * <li> {@link java.util.Calendar#TUESDAY},
296 * <li> {@link java.util.Calendar#WEDNESDAY},
297 * <li> {@link java.util.Calendar#THURSDAY},
298 * <li> {@link java.util.Calendar#FRIDAY},
299 * <li> {@link java.util.Calendar#SATURDAY}
300 * </ul>
Sam Blitzstein435e7df2013-08-16 17:31:20 -0700301 */
302 public static final String EXTRA_DAYS = "android.intent.extra.alarm.DAYS";
303
304 /**
Sam Blitzstein435e7df2013-08-16 17:31:20 -0700305 * Bundle extra: The hour of the alarm.
306 * <p>
307 * Used by {@link #ACTION_SET_ALARM}.
308 * </p><p>
309 * This extra is optional. If not provided, an implementation should open an activity
310 * that allows a user to set an alarm with user provided time.
311 * </p><p>
312 * The value is an {@link Integer} and ranges from 0 to 23.
313 * </p>
314 *
315 * @see #ACTION_SET_ALARM
316 * @see #EXTRA_MINUTES
317 * @see #EXTRA_DAYS
Patrick Scotta73c4b02010-09-22 08:16:53 -0400318 */
319 public static final String EXTRA_HOUR = "android.intent.extra.alarm.HOUR";
320
321 /**
Sam Blitzstein435e7df2013-08-16 17:31:20 -0700322 * Bundle extra: The length of the timer in seconds.
Patrick Scotta73c4b02010-09-22 08:16:53 -0400323 * <p>
Sam Blitzstein435e7df2013-08-16 17:31:20 -0700324 * Used by {@link #ACTION_SET_TIMER}.
325 * </p><p>
326 * This extra is optional. If not provided, an implementation should open an activity
327 * that allows a user to set a timer with user provided length.
328 * </p><p>
329 * The value is an {@link Integer} and ranges from 1 to 86400 (24 hours).
330 * </p>
331 *
332 * @see #ACTION_SET_TIMER
333 */
334 public static final String EXTRA_LENGTH = "android.intent.extra.alarm.LENGTH";
335
336 /**
337 * Bundle extra: A custom message for the alarm or timer.
338 * <p>
339 * Used by {@link #ACTION_SET_ALARM} and {@link #ACTION_SET_TIMER}.
340 * </p><p>
341 * The value is a {@link String}.
342 * </p>
343 *
344 * @see #ACTION_SET_ALARM
345 * @see #ACTION_SET_TIMER
346 */
347 public static final String EXTRA_MESSAGE = "android.intent.extra.alarm.MESSAGE";
348
349 /**
350 * Bundle extra: The minutes of the alarm.
351 * <p>
352 * Used by {@link #ACTION_SET_ALARM}.
353 * </p><p>
354 * The value is an {@link Integer} and ranges from 0 to 59. If not provided, it defaults to 0.
355 * </p>
356 *
357 * @see #ACTION_SET_ALARM
358 * @see #EXTRA_HOUR
359 * @see #EXTRA_DAYS
Patrick Scotta73c4b02010-09-22 08:16:53 -0400360 */
361 public static final String EXTRA_MINUTES = "android.intent.extra.alarm.MINUTES";
Patrick Scott80fdd652010-12-15 11:15:13 -0500362
363 /**
Sam Blitzstein435e7df2013-08-16 17:31:20 -0700364 * Bundle extra: A ringtone to be played with this alarm.
Patrick Scott80fdd652010-12-15 11:15:13 -0500365 * <p>
Sam Blitzstein435e7df2013-08-16 17:31:20 -0700366 * Used by {@link #ACTION_SET_ALARM}.
367 * </p><p>
Sam Blitzstein21ea2d02013-08-21 16:02:21 -0700368 * This value is a {@link String} and can either be set to {@link #VALUE_RINGTONE_SILENT} or
369 * to a content URI of the media to be played. If not specified or the URI doesn't exist,
Sam Blitzstein435e7df2013-08-16 17:31:20 -0700370 * {@code "content://settings/system/alarm_alert} will be used.
371 * </p>
372 *
373 * @see #ACTION_SET_ALARM
Sam Blitzstein21ea2d02013-08-21 16:02:21 -0700374 * @see #VALUE_RINGTONE_SILENT
Sam Blitzstein435e7df2013-08-16 17:31:20 -0700375 * @see #EXTRA_VIBRATE
376 */
377 public static final String EXTRA_RINGTONE = "android.intent.extra.alarm.RINGTONE";
378
379 /**
380 * Bundle extra: Whether or not to display an activity after performing the action.
381 * <p>
382 * Used by {@link #ACTION_SET_ALARM} and {@link #ACTION_SET_TIMER}.
383 * </p><p>
384 * If true, the application is asked to bypass any intermediate UI. If false, the application
385 * may display intermediate UI like a confirmation dialog or settings.
386 * </p><p>
387 * The value is a {@link Boolean}. The default is {@code false}.
388 * </p>
389 *
390 * @see #ACTION_SET_ALARM
391 * @see #ACTION_SET_TIMER
Patrick Scott80fdd652010-12-15 11:15:13 -0500392 */
393 public static final String EXTRA_SKIP_UI = "android.intent.extra.alarm.SKIP_UI";
Sam Blitzstein435e7df2013-08-16 17:31:20 -0700394
395 /**
396 * Bundle extra: Whether or not to activate the device vibrator.
397 * <p>
398 * Used by {@link #ACTION_SET_ALARM}.
399 * </p><p>
400 * The value is a {@link Boolean}. The default is {@code true}.
401 * </p>
402 *
403 * @see #ACTION_SET_ALARM
404 * @see #EXTRA_RINGTONE
Sam Blitzstein21ea2d02013-08-21 16:02:21 -0700405 * @see #VALUE_RINGTONE_SILENT
Sam Blitzstein435e7df2013-08-16 17:31:20 -0700406 */
407 public static final String EXTRA_VIBRATE = "android.intent.extra.alarm.VIBRATE";
408
409 /**
410 * Bundle extra value: Indicates no ringtone should be played.
411 * <p>
412 * Used by {@link #ACTION_SET_ALARM}, passed in through {@link #EXTRA_RINGTONE}.
413 * </p>
414 *
415 * @see #ACTION_SET_ALARM
416 * @see #EXTRA_RINGTONE
417 * @see #EXTRA_VIBRATE
418 */
419 public static final String VALUE_RINGTONE_SILENT = "silent";
Patrick Scotta73c4b02010-09-22 08:16:53 -0400420}