public class IterableNotificationBuilder
extends androidx.core.app.NotificationCompat.Builder
| Modifier | Constructor and Description |
|---|---|
protected |
IterableNotificationBuilder(android.content.Context context,
java.lang.String channelId)
Creates a custom Notification builder
|
| Modifier and Type | Method and Description |
|---|---|
android.app.Notification |
build()
Combine all of the options that have been set and return a new
Notification
object. |
static IterableNotificationBuilder |
createNotification(android.content.Context context,
android.os.Bundle extras)
Creates and returns an instance of IterableNotification.
|
void |
createNotificationActionButton(android.content.Context context,
com.iterable.iterableapi.IterableNotificationData.Button button,
android.os.Bundle extras)
Creates a notification action button for a given JSON payload
|
boolean |
isGhostPush() |
static void |
postNotificationOnDevice(android.content.Context context,
IterableNotificationBuilder iterableNotificationBuilder)
Posts the notification on device.
|
void |
setExpandedContent(java.lang.String content)
Sets the expanded content used for backwards compatibility up to Android API 23
|
void |
setImageUrl(java.lang.String imageUrl)
Sets the image url
|
void |
setIsGhostPush(boolean ghostPush) |
addAction, addAction, addExtras, addInvisibleAction, addInvisibleAction, addPerson, extend, getBigContentView, getColor, getContentView, getExtras, getHeadsUpContentView, getNotification, getPriority, getWhenIfShowing, limitCharSequenceLength, setAutoCancel, setBadgeIconType, setCategory, setChannelId, setColor, setColorized, setContent, setContentInfo, setContentIntent, setContentText, setContentTitle, setCustomBigContentView, setCustomContentView, setCustomHeadsUpContentView, setDefaults, setDeleteIntent, setExtras, setFullScreenIntent, setGroup, setGroupAlertBehavior, setGroupSummary, setLargeIcon, setLights, setLocalOnly, setNumber, setOngoing, setOnlyAlertOnce, setPriority, setProgress, setPublicVersion, setRemoteInputHistory, setShortcutId, setShowWhen, setSmallIcon, setSmallIcon, setSortKey, setSound, setSound, setStyle, setSubText, setTicker, setTicker, setTimeoutAfter, setUsesChronometer, setVibrate, setVisibility, setWhenprotected IterableNotificationBuilder(android.content.Context context,
java.lang.String channelId)
context - channelId - public void setImageUrl(java.lang.String imageUrl)
imageUrl - public void setExpandedContent(java.lang.String content)
content - public void setIsGhostPush(boolean ghostPush)
public boolean isGhostPush()
public android.app.Notification build()
Notification
object.
Download any optional imagesbuild in class androidx.core.app.NotificationCompat.Builderpublic void createNotificationActionButton(android.content.Context context,
com.iterable.iterableapi.IterableNotificationData.Button button,
android.os.Bundle extras)
context - Contextbutton - `IterableNotificationData.Button` object containing button informationextras - Notification payloadpublic static IterableNotificationBuilder createNotification(android.content.Context context, android.os.Bundle extras)
context - extras - public static void postNotificationOnDevice(android.content.Context context,
IterableNotificationBuilder iterableNotificationBuilder)
context - iterableNotificationBuilder - Function assumes that the iterableNotification is a ghostPush
if the IterableNotification passed in is null.