/**@class android.app.Notification implements android.os.Parcelable @extends java.lang.Object A class that represents how a persistent notification is to be presented to the user using the {@link android.app.NotificationManager}. <p>The {@link android.app.Notification.Builder android.app.Notification.Builder} has been added to make it easier to construct Notifications.</p> <div class="special reference"> <h3>Developer Guides</h3> <p>For a guide to creating notifications, read the <a href="{@docRoot}guide/topics/ui/notifiers/notifications.html">Status Bar Notifications</a> developer guide.</p> </div> */ var Notification = { /** An activity that provides a user interface for adjusting notification preferences for its containing application. */ INTENT_CATEGORY_NOTIFICATION_PREFERENCES : "android.intent.category.NOTIFICATION_PREFERENCES", /** Optional extra for {@link #INTENT_CATEGORY_NOTIFICATION_PREFERENCES}. If provided, will contain a {@link android.app.NotificationChannel#getId() channel id} that can be used to narrow down what settings should be shown in the target app. */ EXTRA_CHANNEL_ID : "android.intent.extra.CHANNEL_ID", /** Optional extra for {@link #INTENT_CATEGORY_NOTIFICATION_PREFERENCES}. If provided, will contain a {@link android.app.NotificationChannelGroup#getId() group id} that can be used to narrow down what settings should be shown in the target app. */ EXTRA_CHANNEL_GROUP_ID : "android.intent.extra.CHANNEL_GROUP_ID", /** Optional extra for {@link #INTENT_CATEGORY_NOTIFICATION_PREFERENCES}. If provided, will contain the tag provided to {@link android.app.NotificationManager#notify(String, int, android.app.Notification)} that can be used to narrow down what settings should be shown in the target app. */ EXTRA_NOTIFICATION_TAG : "android.intent.extra.NOTIFICATION_TAG", /** Optional extra for {@link #INTENT_CATEGORY_NOTIFICATION_PREFERENCES}. If provided, will contain the id provided to {@link android.app.NotificationManager#notify(String, int, android.app.Notification)} that can be used to narrow down what settings should be shown in the target app. */ EXTRA_NOTIFICATION_ID : "android.intent.extra.NOTIFICATION_ID", /** Use all default values (where applicable). */ DEFAULT_ALL : "-1", /** Use the default notification sound. This will ignore any given {@link #sound}. <p> A notification that is noisy is more likely to be presented as a heads-up notification. </p> @see #defaults */ DEFAULT_SOUND : "1", /** Use the default notification vibrate. This will ignore any given {@link #vibrate}. Using phone vibration requires the {@link android.Manifest.permission#VIBRATE VIBRATE} permission. <p> A notification that vibrates is more likely to be presented as a heads-up notification. </p> @see #defaults */ DEFAULT_VIBRATE : "2", /** Use the default notification lights. This will ignore the {@link #FLAG_SHOW_LIGHTS} bit, and {@link #ledARGB}, {@link #ledOffMS}, or {@link #ledOnMS}. @see #defaults */ DEFAULT_LIGHTS : "4", /** Maximum number of (generic) action buttons in a notification (contextual action buttons are handled separately). @hide */ MAX_ACTION_BUTTONS : "3", /** If the notification contained an unsent draft for a RemoteInput when the user clicked on it, we're adding the draft as a String extra to the {@link #contentIntent} using this key. <p>Apps may use this extra to prepopulate text fields in the app, where the user usually sends messages.</p> */ EXTRA_REMOTE_INPUT_DRAFT : "android.remoteInputDraft", /** A timestamp related to this notification, in milliseconds since the epoch. Default value: {@link System#currentTimeMillis() Now}. Choose a timestamp that will be most relevant to the user. For most finite events, this corresponds to the time the event happened (or will happen, in the case of events that have yet to occur but about which the user is being informed). Indefinite events should be timestamped according to when the activity began. Some examples: <ul> <li>Notification of a new chat message should be stamped when the message was received.</li> <li>Notification of an ongoing file download (with a progress bar, for example) should be stamped when the download started.</li> <li>Notification of a completed file download should be stamped when the download finished.</li> <li>Notification of an upcoming meeting should be stamped with the time the meeting will begin (that is, in the future).</li> <li>Notification of an ongoing stopwatch (increasing timer) should be stamped with the watch's start time. <li>Notification of an ongoing countdown timer should be stamped with the timer's end time. </ul> For apps targeting {@link android.os.Build.VERSION_CODES#N} and above, this time is not shown anymore by default and must be opted into by using {@link android.app.Notification.Builder#setShowWhen(boolean)} */ when : "null", /** The resource id of a drawable to use as the icon in the status bar. @deprecated Use {@link android.app.AlertDialog.Builder#setSmallIcon(Icon)} instead. */ icon : "null", /** If the icon in the status bar is to have more than one level, you can set this. Otherwise, leave it at its default value of 0. @see android.widget.ImageView#setImageLevel @see android.graphics.drawable.Drawable#setLevel */ iconLevel : "null", /** The number of events that this notification represents. For example, in a new mail notification, this could be the number of unread messages. The system may or may not use this field to modify the appearance of the notification. Starting with {@link android.os.Build.VERSION_CODES#O}, the number may be displayed as a badge icon in Launchers that support badging. */ number : "null", /** The intent to execute when the expanded status entry is clicked. If this is an activity, it must include the {@link android.content.Intent#FLAG_ACTIVITY_NEW_TASK} flag, which requires that you take care of task management as described in the <a href="{@docRoot}guide/topics/fundamentals/tasks-and-back-stack.html">Tasks and Back Stack</a> document. In particular, make sure to read the notification section <a href="{@docRoot}guide/topics/ui/notifiers/notifications.html#HandlingNotifications">Handling Notifications</a> for the correct ways to launch an application from a notification. */ contentIntent : "null", /** The intent to execute when the notification is explicitly dismissed by the user, either with the "Clear All" button or by swiping it away individually. This probably shouldn't be launching an activity since several of those will be sent at the same time. */ deleteIntent : "null", /** An intent to launch instead of posting the notification to the status bar. <p> The system UI may choose to display a heads-up notification, instead of launching this intent, while the user is using the device. </p> @see Notification.Builder#setFullScreenIntent */ fullScreenIntent : "null", /** Text that summarizes this notification for accessibility services. As of the L release, this text is no longer shown on screen, but it is still useful to accessibility services (where it serves as an audible announcement of the notification's appearance). @see #tickerView */ tickerText : "null", /** Formerly, a view showing the {@link #tickerText}. No longer displayed in the status bar as of API 21. */ tickerView : "null", /** The view that will represent this notification in the notification list (which is pulled down from the status bar). As of N, this field may be null. The notification view is determined by the inputs to {@link android.app.Notification.Builder}; a custom RemoteViews can optionally be supplied with {@link android.app.Notification.Builder#setCustomContentView(RemoteViews)}. */ contentView : "null", /** A large-format version of {@link #contentView}, giving the Notification an opportunity to show more detail. The system UI may choose to show this instead of the normal content view at its discretion. As of N, this field may be null. The expanded notification view is determined by the inputs to {@link android.app.Notification.Builder}; a custom RemoteViews can optionally be supplied with {@link android.app.Notification.Builder#setCustomBigContentView(RemoteViews)}. */ bigContentView : "null", /** A medium-format version of {@link #contentView}, providing the Notification an opportunity to add action buttons to contentView. At its discretion, the system UI may choose to show this as a heads-up notification, which will pop up so the user can see it without leaving their current activity. As of N, this field may be null. The heads-up notification view is determined by the inputs to {@link android.app.Notification.Builder}; a custom RemoteViews can optionally be supplied with {@link android.app.Notification.Builder#setCustomHeadsUpContentView(RemoteViews)}. */ headsUpContentView : "null", /** A large bitmap to be shown in the notification content area. @deprecated Use {@link android.app.AlertDialog.Builder#setLargeIcon(Icon)} instead. */ largeIcon : "null", /** The sound to play. <p> A notification that is noisy is more likely to be presented as a heads-up notification. </p> <p> To play the default notification sound, see {@link #defaults}. </p> @deprecated use {@link android.app.NotificationChannel#getSound()}. */ sound : "null", /** Use this constant as the value for audioStreamType to request that the default stream type for notifications be used. Currently the default stream type is {@link AudioManager#STREAM_NOTIFICATION}. @deprecated Use {@link android.app.NotificationChannel#getAudioAttributes()} instead. */ STREAM_DEFAULT : "-1", /** The audio stream type to use when playing the sound. Should be one of the STREAM_ constants from {@link android.media.AudioManager}. @deprecated Use {@link #audioAttributes} instead. */ audioStreamType : "null", /** The default value of {@link #audioAttributes}. */ AUDIO_ATTRIBUTES_DEFAULT : "null", /** The {@link AudioAttributes audio attributes} to use when playing the sound. @deprecated use {@link android.app.NotificationChannel#getAudioAttributes()} instead. */ audioAttributes : "null", /** The pattern with which to vibrate. <p> To vibrate the default pattern, see {@link #defaults}. </p> @see android.os.Vibrator#vibrate(long[],int) @deprecated use {@link android.app.NotificationChannel#getVibrationPattern()}. */ vibrate : "null", /** The color of the led. The hardware will do its best approximation. @see #FLAG_SHOW_LIGHTS @see #flags @deprecated use {@link android.app.NotificationChannel#shouldShowLights()}. */ ledARGB : "null", /** The number of milliseconds for the LED to be on while it's flashing. The hardware will do its best approximation. @see #FLAG_SHOW_LIGHTS @see #flags @deprecated use {@link android.app.NotificationChannel#shouldShowLights()}. */ ledOnMS : "null", /** The number of milliseconds for the LED to be off while it's flashing. The hardware will do its best approximation. @see #FLAG_SHOW_LIGHTS @see #flags @deprecated use {@link android.app.NotificationChannel#shouldShowLights()}. */ ledOffMS : "null", /** Specifies which values should be taken from the defaults. <p> To set, OR the desired from {@link #DEFAULT_SOUND}, {@link #DEFAULT_VIBRATE}, {@link #DEFAULT_LIGHTS}. For all default values, use {@link #DEFAULT_ALL}. </p> @deprecated use {@link android.app.NotificationChannel#getSound()} and {@link android.app.NotificationChannel#shouldShowLights()} and {@link android.app.NotificationChannel#shouldVibrate()}. */ defaults : "null", /** Bit to be bitwise-ored into the {@link #flags} field that should be set if you want the LED on for this notification. <ul> <li>To turn the LED off, pass 0 in the alpha channel for colorARGB or 0 for both ledOnMS and ledOffMS.</li> <li>To turn the LED on, pass 1 for ledOnMS and 0 for ledOffMS.</li> <li>To flash the LED, pass the number of milliseconds that it should be on and off to ledOnMS and ledOffMS.</li> </ul> <p> Since hardware varies, you are not guaranteed that any of the values you pass are honored exactly. Use the system defaults if possible because they will be set to values that work on any given hardware. <p> The alpha channel must be set for forward compatibility. @deprecated use {@link android.app.NotificationChannel#shouldShowLights()}. */ FLAG_SHOW_LIGHTS : "1", /** Bit to be bitwise-ored into the {@link #flags} field that should be set if this notification is in reference to something that is ongoing, like a phone call. It should not be set if this notification is in reference to something that happened at a particular point in time, like a missed phone call. */ FLAG_ONGOING_EVENT : "2", /** Bit to be bitwise-ored into the {@link #flags} field that if set, the audio will be repeated until the notification is cancelled or the notification window is opened. */ FLAG_INSISTENT : "4", /** Bit to be bitwise-ored into the {@link #flags} field that should be set if you would only like the sound, vibrate and ticker to be played if the notification was not already showing. */ FLAG_ONLY_ALERT_ONCE : "8", /** Bit to be bitwise-ored into the {@link #flags} field that should be set if the notification should be canceled when it is clicked by the user. */ FLAG_AUTO_CANCEL : "16", /** Bit to be bitwise-ored into the {@link #flags} field that should be set if the notification should not be canceled when the user clicks the Clear all button. */ FLAG_NO_CLEAR : "32", /** Bit to be bitwise-ored into the {@link #flags} field that should be set if this notification represents a currently running service. This will normally be set for you by {@link android.app.Service#startForeground}. */ FLAG_FOREGROUND_SERVICE : "64", /** Obsolete flag indicating high-priority notifications; use the priority field instead. @deprecated Use {@link #priority} with a positive value. */ FLAG_HIGH_PRIORITY : "128", /** Bit to be bitswise-ored into the {@link #flags} field that should be set if this notification is relevant to the current device only and it is not recommended that it bridge to other devices. */ FLAG_LOCAL_ONLY : "256", /** Bit to be bitswise-ored into the {@link #flags} field that should be set if this notification is the group summary for a group of notifications. Grouped notifications may display in a cluster or stack on devices which support such rendering. Requires a group key also be set using {@link android.app.AlertDialog.Builder#setGroup}. */ FLAG_GROUP_SUMMARY : "512", /** Bit to be bitswise-ored into the {@link #flags} field that should be set if this notification is the group summary for an auto-group of notifications. @hide */ FLAG_AUTOGROUP_SUMMARY : "1024", /** @hide */ FLAG_CAN_COLORIZE : "2048", /** Bit to be bitswised-ored into the {@link #flags} field that should be set by the system if this notification is showing as a bubble. Applications cannot set this flag directly; they should instead call {@link android.app.Notification.Builder#setBubbleMetadata(BubbleMetadata)} to request that a notification be displayed as a bubble, and then check this flag to see whether that request was honored by the system. */ FLAG_BUBBLE : "4096", /***/ flags : "null", /** Default notification {@link #priority}. If your application does not prioritize its own notifications, use this value for all notifications. @deprecated use {@link android.app.NotificationManager#IMPORTANCE_DEFAULT} instead. */ PRIORITY_DEFAULT : "0", /** Lower {@link #priority}, for items that are less important. The UI may choose to show these items smaller, or at a different position in the list, compared with your app's {@link #PRIORITY_DEFAULT} items. @deprecated use {@link android.app.NotificationManager#IMPORTANCE_LOW} instead. */ PRIORITY_LOW : "-1", /** Lowest {@link #priority}; these items might not be shown to the user except under special circumstances, such as detailed notification logs. @deprecated use {@link android.app.NotificationManager#IMPORTANCE_MIN} instead. */ PRIORITY_MIN : "-2", /** Higher {@link #priority}, for more important notifications or alerts. The UI may choose to show these items larger, or at a different position in notification lists, compared with your app's {@link #PRIORITY_DEFAULT} items. @deprecated use {@link android.app.NotificationManager#IMPORTANCE_HIGH} instead. */ PRIORITY_HIGH : "1", /** Highest {@link #priority}, for your application's most important items that require the user's prompt attention or input. @deprecated use {@link android.app.NotificationManager#IMPORTANCE_HIGH} instead. */ PRIORITY_MAX : "2", /** Relative priority for this notification. Priority is an indication of how much of the user's valuable attention should be consumed by this notification. Low-priority notifications may be hidden from the user in certain situations, while the user might be interrupted for a higher-priority notification. The system will make a determination about how to interpret this priority when presenting the notification. <p> A notification that is at least {@link #PRIORITY_HIGH} is more likely to be presented as a heads-up notification. </p> @deprecated use {@link android.app.NotificationChannel#getImportance()} instead. */ priority : "null", /** Accent color (an ARGB integer like the constants in {@link android.graphics.Color}) to be applied by the standard Style templates when presenting this notification. The current template design constructs a colorful header image by overlaying the {@link #icon} image (stenciled in white) atop a field of this color. Alpha components are ignored. */ color : "null", /** Special value of {@link #color} telling the system not to decorate this notification with any special color but instead use default colors when presenting this notification. */ COLOR_DEFAULT : "0", /** Special value of {@link #color} used as a place holder for an invalid color. @hide */ COLOR_INVALID : "1", /** Sphere of visibility of this notification, which affects how and when the SystemUI reveals the notification's presence and contents in untrusted situations (namely, on the secure lockscreen). The default level, {@link #VISIBILITY_PRIVATE}, behaves exactly as notifications have always done on Android: The notification's {@link #icon} and {@link #tickerText} (if available) are shown in all situations, but the contents are only available if the device is unlocked for the appropriate user. A more permissive policy can be expressed by {@link #VISIBILITY_PUBLIC}; such a notification can be read even in an "insecure" context (that is, above a secure lockscreen). To modify the public version of this notification—for example, to redact some portions—see {@link android.app.AlertDialog.Builder#setPublicVersion(Notification)}. Finally, a notification can be made {@link #VISIBILITY_SECRET}, which will suppress its icon and ticker until the user has bypassed the lockscreen. */ visibility : "null", /** Notification visibility: Show this notification in its entirety on all lockscreens. {@see #visibility} */ VISIBILITY_PUBLIC : "1", /** Notification visibility: Show this notification on all lockscreens, but conceal sensitive or private information on secure lockscreens. {@see #visibility} */ VISIBILITY_PRIVATE : "0", /** Notification visibility: Do not reveal any part of this notification on a secure lockscreen. {@see #visibility} */ VISIBILITY_SECRET : "-1", /** Notification category: incoming call (voice or video) or similar synchronous communication request. */ CATEGORY_CALL : "call", /** Notification category: map turn-by-turn navigation. */ CATEGORY_NAVIGATION : "navigation", /** Notification category: incoming direct message (SMS, instant message, etc.). */ CATEGORY_MESSAGE : "msg", /** Notification category: asynchronous bulk message (email). */ CATEGORY_EMAIL : "email", /** Notification category: calendar event. */ CATEGORY_EVENT : "event", /** Notification category: promotion or advertisement. */ CATEGORY_PROMO : "promo", /** Notification category: alarm or timer. */ CATEGORY_ALARM : "alarm", /** Notification category: progress of a long-running background operation. */ CATEGORY_PROGRESS : "progress", /** Notification category: social network or sharing update. */ CATEGORY_SOCIAL : "social", /** Notification category: error in background operation or authentication status. */ CATEGORY_ERROR : "err", /** Notification category: media transport control for playback. */ CATEGORY_TRANSPORT : "transport", /** Notification category: system or device status update. Reserved for system use. */ CATEGORY_SYSTEM : "sys", /** Notification category: indication of running background service. */ CATEGORY_SERVICE : "service", /** Notification category: a specific, timely recommendation for a single thing. For example, a news app might want to recommend a news story it believes the user will want to read next. */ CATEGORY_RECOMMENDATION : "recommendation", /** Notification category: ongoing information about device or contextual status. */ CATEGORY_STATUS : "status", /** Notification category: user-scheduled reminder. */ CATEGORY_REMINDER : "reminder", /** Notification category: extreme car emergencies. @hide */ CATEGORY_CAR_EMERGENCY : "car_emergency", /** Notification category: car warnings. @hide */ CATEGORY_CAR_WARNING : "car_warning", /** Notification category: general car system information. @hide */ CATEGORY_CAR_INFORMATION : "car_information", /** One of the predefined notification categories (see the <code>CATEGORY_*</code> constants) that best describes this Notification. May be used by the system for ranking and filtering. */ category : "null", /** Additional semantic data to be carried around with this Notification. <p> The extras keys defined here are intended to capture the original inputs to {@link android.app.AlertDialog.Builder} APIs, and are intended to be used by {@link android.service.notification.NotificationListenerService} implementations to extract detailed information from notification objects. */ extras : "null", /** All pending intents in the notification as the system needs to be able to access them but touching the extras bundle in the system process is not safe because the bundle may contain custom parcelable objects. @hide */ allPendingIntents : "null", /** Must be set by a process to start associating tokens with Notification objects coming in to it. This is set by NotificationManagerService. @hide */ processWhitelistToken : "null", /** {@link #extras} key: this is the title of the notification, as supplied to {@link android.app.AlertDialog.Builder#setContentTitle(CharSequence)}. */ EXTRA_TITLE : "android.title", /** {@link #extras} key: this is the title of the notification when shown in expanded form, e.g. as supplied to {@link android.app.Notification.BigTextStyle#setBigContentTitle(CharSequence)}. */ EXTRA_TITLE_BIG : "android.title.big", /** {@link #extras} key: this is the main text payload, as supplied to {@link android.app.AlertDialog.Builder#setContentText(CharSequence)}. */ EXTRA_TEXT : "android.text", /** {@link #extras} key: this is a third line of text, as supplied to {@link android.app.AlertDialog.Builder#setSubText(CharSequence)}. */ EXTRA_SUB_TEXT : "android.subText", /** {@link #extras} key: this is the remote input history, as supplied to {@link android.app.AlertDialog.Builder#setRemoteInputHistory(CharSequence[])}. Apps can fill this through {@link android.app.AlertDialog.Builder#setRemoteInputHistory(CharSequence[])} with the most recent inputs that have been sent through a {@link android.app.RemoteInput} of this Notification and are expected to clear it once the it is no longer relevant (e.g. for chat notifications once the other party has responded). The extra with this key is of type CharSequence[] and contains the most recent entry at the 0 index, the second most recent at the 1 index, etc. @see Builder#setRemoteInputHistory(CharSequence[]) */ EXTRA_REMOTE_INPUT_HISTORY : "android.remoteInputHistory", /** {@link #extras} key: boolean as supplied to {@link android.app.AlertDialog.Builder#setShowRemoteInputSpinner(boolean)}. If set to true, then the view displaying the remote input history from {@link android.app.AlertDialog.Builder#setRemoteInputHistory(CharSequence[])} will have a progress spinner. @see Builder#setShowRemoteInputSpinner(boolean) @hide */ EXTRA_SHOW_REMOTE_INPUT_SPINNER : "android.remoteInputSpinner", /** {@link #extras} key: boolean as supplied to {@link android.app.AlertDialog.Builder#setHideSmartReplies(boolean)}. If set to true, then any smart reply buttons will be hidden. @see Builder#setHideSmartReplies(boolean) @hide */ EXTRA_HIDE_SMART_REPLIES : "android.hideSmartReplies", /** {@link #extras} key: this is a small piece of additional text as supplied to {@link android.app.AlertDialog.Builder#setContentInfo(CharSequence)}. */ EXTRA_INFO_TEXT : "android.infoText", /** {@link #extras} key: this is a line of summary information intended to be shown alongside expanded notifications, as supplied to (e.g.) {@link android.app.Notification.BigTextStyle#setSummaryText(CharSequence)}. */ EXTRA_SUMMARY_TEXT : "android.summaryText", /** {@link #extras} key: this is the longer text shown in the big form of a {@link android.app.Notification.BigTextStyle} notification, as supplied to {@link android.app.Notification.BigTextStyle#bigText(CharSequence)}. */ EXTRA_BIG_TEXT : "android.bigText", /** {@link #extras} key: this is the resource ID of the notification's main small icon, as supplied to {@link android.app.AlertDialog.Builder#setSmallIcon(int)}. @deprecated Use {@link #getSmallIcon}(), which supports a wider variety of icon sources. */ EXTRA_SMALL_ICON : "android.icon", /** {@link #extras} key: this is a bitmap to be used instead of the small icon when showing the notification payload, as supplied to {@link android.app.AlertDialog.Builder#setLargeIcon(android.graphics.Bitmap)}. @deprecated Use {@link #getLargeIcon}(), which supports a wider variety of icon sources. */ EXTRA_LARGE_ICON : "android.largeIcon", /** {@link #extras} key: this is a bitmap to be used instead of the one from {@link android.app.AlertDialog.Builder#setLargeIcon(android.graphics.Bitmap)} when the notification is shown in its expanded form, as supplied to {@link android.app.Notification.BigPictureStyle#bigLargeIcon(android.graphics.Bitmap)}. */ EXTRA_LARGE_ICON_BIG : "android.largeIcon.big", /** {@link #extras} key: this is the progress value supplied to {@link android.app.AlertDialog.Builder#setProgress(int, int, boolean)}. */ EXTRA_PROGRESS : "android.progress", /** {@link #extras} key: this is the maximum value supplied to {@link android.app.AlertDialog.Builder#setProgress(int, int, boolean)}. */ EXTRA_PROGRESS_MAX : "android.progressMax", /** {@link #extras} key: whether the progress bar is indeterminate, supplied to {@link android.app.AlertDialog.Builder#setProgress(int, int, boolean)}. */ EXTRA_PROGRESS_INDETERMINATE : "android.progressIndeterminate", /** {@link #extras} key: whether {@link #when} should be shown as a count-up timer (specifically a {@link android.widget.Chronometer}) instead of a timestamp, as supplied to {@link android.app.AlertDialog.Builder#setUsesChronometer(boolean)}. */ EXTRA_SHOW_CHRONOMETER : "android.showChronometer", /** {@link #extras} key: whether the chronometer set on the notification should count down instead of counting up. Is only relevant if key {@link #EXTRA_SHOW_CHRONOMETER} is present. This extra is a boolean. The default is false. */ EXTRA_CHRONOMETER_COUNT_DOWN : "android.chronometerCountDown", /** {@link #extras} key: whether {@link #when} should be shown, as supplied to {@link android.app.AlertDialog.Builder#setShowWhen(boolean)}. */ EXTRA_SHOW_WHEN : "android.showWhen", /** {@link #extras} key: this is a bitmap to be shown in {@link android.app.Notification.BigPictureStyle} expanded notifications, supplied to {@link android.app.Notification.BigPictureStyle#bigPicture(android.graphics.Bitmap)}. */ EXTRA_PICTURE : "android.picture", /** {@link #extras} key: An array of CharSequences to show in {@link android.app.Notification.InboxStyle} expanded notifications, each of which was supplied to {@link android.app.Notification.InboxStyle#addLine(CharSequence)}. */ EXTRA_TEXT_LINES : "android.textLines", /** {@link #extras} key: A string representing the name of the specific {@link android.app.Notification.Style} used to create this notification. */ EXTRA_TEMPLATE : "android.template", /** {@link #extras} key: A String array containing the people that this notification relates to, each of which was supplied to {@link android.app.AlertDialog.Builder#addPerson(String)}. @deprecated the actual objects are now in {@link #EXTRA_PEOPLE_LIST} */ EXTRA_PEOPLE : "android.people", /** {@link #extras} key: An arrayList of {@link android.app.Person} objects containing the people that this notification relates to. */ EXTRA_PEOPLE_LIST : "android.people.list", /** Allow certain system-generated notifications to appear before the device is provisioned. Only available to notifications coming from the android package. @hide */ EXTRA_ALLOW_DURING_SETUP : "android.allowDuringSetup", /** {@link #extras} key: flat {@link String} representation of a {@link android.content.ContentUris content URI} pointing to an image that can be displayed in the background when the notification is selected. Used on television platforms. The URI must point to an image stream suitable for passing into {@link android.graphics.BitmapFactory#decodeStream(java.io.InputStream) BitmapFactory.decodeStream}; all other content types will be ignored. */ EXTRA_BACKGROUND_IMAGE_URI : "android.backgroundImageUri", /** {@link #extras} key: A {@link android.media.session.MediaSession.Token} associated with a {@link android.app.Notification.MediaStyle} notification. */ EXTRA_MEDIA_SESSION : "android.mediaSession", /** {@link #extras} key: the indices of actions to be shown in the compact view, as supplied to (e.g.) {@link android.app.Notification.MediaStyle#setShowActionsInCompactView(int...)}. */ EXTRA_COMPACT_ACTIONS : "android.compactActions", /** {@link #extras} key: the username to be displayed for all messages sent by the user including direct replies {@link android.app.Notification.MessagingStyle} notification. This extra is a {@link CharSequence} @deprecated use {@link #EXTRA_MESSAGING_PERSON} */ EXTRA_SELF_DISPLAY_NAME : "android.selfDisplayName", /** {@link #extras} key: the person to be displayed for all messages sent by the user including direct replies {@link android.app.Notification.MessagingStyle} notification. This extra is a {@link android.app.Person} */ EXTRA_MESSAGING_PERSON : "android.messagingUser", /** {@link #extras} key: a {@link CharSequence} to be displayed as the title to a conversation represented by a {@link android.app.Notification.MessagingStyle} */ EXTRA_CONVERSATION_TITLE : "android.conversationTitle", /** {@link #extras} key: an array of {@link android.app.Notification.MessagingStyle.Message} bundles provided by a {@link android.app.Notification.MessagingStyle} notification. This extra is a parcelable array of bundles. */ EXTRA_MESSAGES : "android.messages", /** {@link #extras} key: an array of {@link android.app.Notification.MessagingStyle#addHistoricMessage historic} {@link android.app.Notification.MessagingStyle.Message} bundles provided by a {@link android.app.Notification.MessagingStyle} notification. This extra is a parcelable array of bundles. */ EXTRA_HISTORIC_MESSAGES : "android.messages.historic", /** {@link #extras} key: whether the {@link android.app.Notification.MessagingStyle} notification represents a group conversation. */ EXTRA_IS_GROUP_CONVERSATION : "android.isGroupConversation", /** {@link #extras} key: whether the notification should be colorized as supplied to {@link android.app.AlertDialog.Builder#setColorized(boolean)}. */ EXTRA_COLORIZED : "android.colorized", /** @hide */ EXTRA_BUILDER_APPLICATION_INFO : "android.appInfo", /** @hide */ EXTRA_CONTAINS_CUSTOM_VIEW : "android.contains.customView", /** @hide */ EXTRA_REDUCED_IMAGES : "android.reduced.images", /** {@link #extras} key: the audio contents of this notification. This is for use when rendering the notification on an audio-focused interface; the audio contents are a complete sound sample that contains the contents/body of the notification. This may be used in substitute of a Text-to-Speech reading of the notification. For example if the notification represents a voice message this should point to the audio of that message. The data stored under this key should be a String representation of a Uri that contains the audio contents in one of the following formats: WAV, PCM 16-bit, AMR-WB. This extra is unnecessary if you are using {@code MessagingStyle} since each {@code Message} has a field for holding data URI. That field can be used for audio. See {@code Message#setData}. Example usage: <pre> {@code Notification.Builder myBuilder = (build your Notification as normal); myBuilder.getExtras().putString(EXTRA_AUDIO_CONTENTS_URI, myAudioUri.toString()); } </pre> */ EXTRA_AUDIO_CONTENTS_URI : "android.audioContents", /**@hide */ EXTRA_SUBSTITUTE_APP_NAME : "android.substName", /** This is set on the notifications shown by system_server about apps running foreground services. It indicates that the notification should be shown only if any of the given apps do not already have a properly tagged {@link #FLAG_FOREGROUND_SERVICE} notification currently visible to the user. This is a string array of all package names of the apps. @hide */ EXTRA_FOREGROUND_APPS : "android.foregroundApps", /** Constant for {@link android.app.AlertDialog.Builder#setGroupAlertBehavior(int)}, meaning that all notifications in a group with sound or vibration ought to make sound or vibrate (respectively), so this notification will not be muted when it is in a group. */ GROUP_ALERT_ALL : "0", /** Constant for {@link android.app.AlertDialog.Builder#setGroupAlertBehavior(int)}, meaning that all children notification in a group should be silenced (no sound or vibration) even if they are posted to a {@link android.app.NotificationChannel} that has sound and/or vibration. Use this constant to mute this notification if this notification is a group child. This must be applied to all children notifications you want to mute. <p> For example, you might want to use this constant if you post a number of children notifications at once (say, after a periodic sync), and only need to notify the user audibly once. */ GROUP_ALERT_SUMMARY : "1", /** Constant for {@link android.app.AlertDialog.Builder#setGroupAlertBehavior(int)}, meaning that the summary notification in a group should be silenced (no sound or vibration) even if they are posted to a {@link android.app.NotificationChannel} that has sound and/or vibration. Use this constant to mute this notification if this notification is a group summary. <p>For example, you might want to use this constant if only the children notifications in your group have content and the summary is only used to visually group notifications rather than to alert the user that new information is available. */ GROUP_ALERT_CHILDREN : "2", /** If this notification is being shown as a badge, always show as a number. */ BADGE_ICON_NONE : "0", /** If this notification is being shown as a badge, use the {@link #getSmallIcon}() to represent this notification. */ BADGE_ICON_SMALL : "1", /** If this notification is being shown as a badge, use the {@link #getLargeIcon}() to represent this notification. */ BADGE_ICON_LARGE : "2", /** Array of all {@link android.app.Notification.Action} structures attached to this notification by {@link android.app.AlertDialog.Builder#addAction(int, CharSequence, PendingIntent)}. Mostly useful for instances of {@link android.service.notification.NotificationListenerService} that provide an alternative interface for invoking actions. */ actions : "null", /** Replacement version of this notification whose content will be shown in an insecure context such as atop a secure keyguard. See {@link #visibility} and {@link #VISIBILITY_PUBLIC}. */ publicVersion : "null", /** Parcelable.Creator that instantiates Notification objects */ CREATOR : "null", /**Get the key used to group this notification into a cluster or stack with other notifications on devices which support such rendering. */ getGroup : function( ) {}, /**Get a sort key that orders this notification among other notifications from the same package. This can be useful if an external sort was already applied and an app would like to preserve this. Notifications will be sorted lexicographically using this value, although providing different priorities in addition to providing sort key may cause this value to be ignored. <p>This sort key can also be used to order members of a notification group. See {@link android.app.AlertDialog.Builder#setGroup}. @see String#compareTo(String) */ getSortKey : function( ) {}, /** */ clone : function( ) {}, /**Copy all (or if heavy is false, all except Bitmaps and RemoteViews) members of this into that. @hide */ cloneInto : function( ) {}, /**Note all {@link Uri} that are referenced internally, with the expectation that Uri permission grants will need to be issued to ensure the recipient of this object is able to render its contents. @hide */ visitUris : function( ) {}, /**Removes heavyweight parts of the Notification object for archival or for sending to listeners when the full contents are not necessary. @hide */ lightenPayload : function( ) {}, /**Make sure this CharSequence is safe to put into a bundle, which basically means it had better not be some custom Parcelable implementation. @hide */ safeCharSequence : function( ) {}, /** */ describeContents : function( ) {}, /**Flatten this notification into a parcel. */ writeToParcel : function( ) {}, /** @hide */ areActionsVisiblyDifferent : function( ) {}, /** @hide */ areStyledNotificationsVisiblyDifferent : function( ) {}, /** @hide */ areRemoteViewsChanged : function( ) {}, /**Sets the {@link #contentView} field to be a view with the standard "Latest Event" layout. <p>Uses the {@link #icon} and {@link #when} fields to set the icon and time fields in the view.</p> @param {Object {Context}} context The context for your application / activity. @param {Object {CharSequence}} contentTitle The title that goes in the expanded entry. @param {Object {CharSequence}} contentText The text that goes in the expanded entry. @param {Object {PendingIntent}} contentIntent The intent to launch when the user clicks the expanded notification. If this is an activity, it must include the {@link android.content.Intent#FLAG_ACTIVITY_NEW_TASK} flag, which requires that you take care of task management as described in the <a href="{@docRoot}guide/topics/fundamentals/tasks-and-back-stack.html">Tasks and Back Stack</a> document. @deprecated Use {@link Builder} instead. @removed */ setLatestEventInfo : function( ) {}, /** @hide */ addFieldsFromContext : function( ) {}, /** @hide */ addFieldsFromContext : function( ) {}, /** @hide */ writeToProto : function( ) {}, /** */ toString : function( ) {}, /**{@hide} */ visibilityToString : function( ) {}, /**{@hide} */ priorityToString : function( ) {}, /** @hide */ hasCompletedProgress : function( ) {}, /** @removed */ getChannel : function( ) {}, /**Returns the id of the channel this notification posts to. */ getChannelId : function( ) {}, /** @removed */ getTimeout : function( ) {}, /**Returns the duration from posting after which this notification should be canceled by the system, if it's not canceled already. */ getTimeoutAfter : function( ) {}, /**Returns what icon should be shown for this notification if it is being displayed in a Launcher that supports badging. Will be one of {@link #BADGE_ICON_NONE}, {@link #BADGE_ICON_SMALL}, or {@link #BADGE_ICON_LARGE}. */ getBadgeIconType : function( ) {}, /**Returns the {@link ShortcutInfo#getId() id} that this notification supersedes, if any. <p>Used by some Launchers that display notification content to hide shortcuts that duplicate notifications. */ getShortcutId : function( ) {}, /**Gets the {@link LocusId} associated with this notification. <p>Used by the Android system to correlate objects (such as {@link ShortcutInfo} and {@link ContentCaptureContext}). */ getLocusId : function( ) {}, /**Returns the settings text provided to {@link android.app.AlertDialog.Builder#setSettingsText(CharSequence)}. */ getSettingsText : function( ) {}, /**Returns which type of notifications in a group are responsible for audibly alerting the user. See {@link #GROUP_ALERT_ALL}, {@link #GROUP_ALERT_CHILDREN}, {@link #GROUP_ALERT_SUMMARY}. */ getGroupAlertBehavior : function( ) {}, /**Returns the bubble metadata that will be used to display app content in a floating window over the existing foreground activity. */ getBubbleMetadata : function( ) {}, /**Returns whether the platform is allowed (by the app developer) to generate contextual actions for this notification. */ getAllowSystemGeneratedContextualActions : function( ) {}, /**The small icon representing this notification in the status bar and content view. @return {Object {android.graphics.drawable.Icon}} the small icon representing this notification. @see Builder#getSmallIcon() @see Builder#setSmallIcon(Icon) */ getSmallIcon : function( ) {}, /**Used when notifying to clean up legacy small icons. @hide */ setSmallIcon : function( ) {}, /**The large icon shown in this notification's content view. @see Builder#getLargeIcon() @see Builder#setLargeIcon(Icon) */ getLargeIcon : function( ) {}, /** @hide */ isGroupSummary : function( ) {}, /** @hide */ isGroupChild : function( ) {}, /** @hide */ suppressAlertingDueToGrouping : function( ) {}, /**Finds and returns a remote input and its corresponding action. @param {Boolean} requiresFreeform requires the remoteinput to allow freeform or not. @return {Object {android.util.Pair}} the result pair, {@code null} if no result is found. @hide */ findRemoteInputActionPair : function( ) {}, /**Returns the actions that are contextual out of the actions in this notification. @hide */ getContextualActions : function( ) {}, /** @return {Boolean} whether this notification is a foreground service notification @hide */ isForegroundService : function( ) {}, /** @return {Boolean} whether this notification has a media session attached @hide */ hasMediaSession : function( ) {}, /** @return {Object {java.lang.Class}} the style class of this notification @hide */ getNotificationStyle : function( ) {}, /** @return {Boolean} true if this notification is colorized. @hide */ isColorized : function( ) {}, /** @return {Boolean} true if this notification is colorized and it is a media notification @hide */ isColorizedMedia : function( ) {}, /** @return {Boolean} true if this is a media notification @hide */ isMediaNotification : function( ) {}, /** @return {Boolean} true if this notification is showing as a bubble @hide */ isBubbleNotification : function( ) {}, /** @return {Boolean} true if the notification will show the time; false otherwise @hide */ showsTime : function( ) {}, /** @return {Boolean} true if the notification will show a chronometer; false otherwise @hide */ showsChronometer : function( ) {}, /** @removed */ getNotificationStyleClass : function( ) {}, };