SetRemoteInputHistory( CharSequence text)Ĭontrol whether the timestamp set with setWhen is shown in the content view.Ī variant of setSmallIcon(int) that takes an additional level parameter for when the icon is a LevelListDrawable. Supply a replacement Notification whose contents should be shown in insecure contexts (i.e. Set the progress this notification represents, which may be represented as a ProgressBar. SetProgress(int max, int progress, boolean indeterminate) Set the relative priority for this notification. Set this flag if you would only like the sound, vibrate and ticker to be played if the notification is not already showing. Set whether this is an ongoing notification. Set the large number at the right-hand side of the notification. Set whether or not this notification is only relevant to the current device. Set the argb value that you would like the LED on the device to blnk, as well as the rate. Set the large icon that is shown in the ticker and notification. Set this notification to be the group summary for a group of notifications. Set this notification to be part of a group of notifications sharing the same key. SetFullScreenIntent( PendingIntent intent, boolean highPriority)Īn intent to launch instead of posting the notification to the status bar. Supply a PendingIntent to send when the notification is cleared by the user directly from the notification panel. Set the default notification options that will be used. Supply custom RemoteViews to use instead of the platform template in the heads up dialog. SetCustomHeadsUpContentView( RemoteViews contentView) Supply custom RemoteViews to use instead of the platform template. SetCustomContentView( RemoteViews contentView) Supply custom RemoteViews to use instead of the platform template in the expanded form. SetCustomBigContentView( RemoteViews contentView) Set the title (first row) of the notification, in a standard notification. Set the text (second row) of the notification, in a standard notification. Supply a PendingIntent to send when the notification is clicked. Set the large text at the right-hand side of the notification. Supply a custom RemoteViews to use instead of the standard one. Setting this flag will make it so the notification is automatically canceled when the user clicks it in the panel. Get the current metadata Bundle used by this notification Builder. Merge additional metadata into this notification.Īdd a person that is relevant to this notification.Ĭombine all of the options that have been set and return a new Notification object.Įxtend( NotificationCompat.Extender extender)Īpply an extender to this notification builder. NotificationCompat.Builder( Context context)ĪddAction( NotificationCompat.Action action)ĪddAction(int icon, CharSequence title, PendingIntent intent) To do this, use the setContentIntent() method. Action buttons depend on expanded notifications, which are only available in Android 4.1 and later.įor this reason, you should always ensure that UI controls in a notification are also available in an Activity in your app, and you should always start that Activity when users click the notification. On platform versions that don't offer expanded notifications, methods that depend on expanded notifications have no effect.įor example, action buttons won't appear on platforms prior to Android 4.1. Allows easier control over all the flags, as well as help constructing the typical notification layouts. Builder class for NotificationCompat objects.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |