Package com.swrve.sdk
Class SwrveNotificationBuilder
- java.lang.Object
-
- com.swrve.sdk.SwrveNotificationBuilder
-
public class SwrveNotificationBuilder extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
campaignType
protected int
requestCode
-
Constructor Summary
Constructors Constructor Description SwrveNotificationBuilder(android.content.Context context, SwrveNotificationConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description androidx.core.app.NotificationCompat.Builder
build(java.lang.String msgText, android.os.Bundle msg, SwrveNotification swrveNotification, java.lang.String campaignType, android.os.Bundle eventPayload)
androidx.core.app.NotificationCompat.Builder
build(java.lang.String msgText, android.os.Bundle msg, java.lang.String campaignType, android.os.Bundle eventPayload)
android.content.Intent
createButtonIntent(android.content.Context context, android.os.Bundle msg, SwrveNotificationButton.ActionType actionType, boolean isDismissAction)
protected android.app.PendingIntent
createPendingIntent(android.os.Bundle msg, java.lang.String campaignType, android.os.Bundle eventPayload)
protected android.graphics.Bitmap
downloadBitmapImageFromUrl(java.lang.String mediaUrl)
protected android.graphics.Bitmap
getImageFromCache(java.lang.String url)
protected android.graphics.Bitmap
getImageFromUrl(java.lang.String url)
java.lang.Class
getIntentClass(int sdkVersion, boolean isDismissAction)
SwrveNotificationDetails
getNotificationDetails()
int
getNotificationId()
protected java.util.Date
getNow()
protected android.app.PendingIntent
getPendingIntent(int sdkVersion, android.content.Intent intent, int flags, boolean isDismissAction)
protected int
getSDKVersion()
-
-
-
Constructor Detail
-
SwrveNotificationBuilder
public SwrveNotificationBuilder(android.content.Context context, SwrveNotificationConfig config)
-
-
Method Detail
-
build
public androidx.core.app.NotificationCompat.Builder build(java.lang.String msgText, android.os.Bundle msg, java.lang.String campaignType, android.os.Bundle eventPayload)
-
build
public androidx.core.app.NotificationCompat.Builder build(java.lang.String msgText, android.os.Bundle msg, SwrveNotification swrveNotification, java.lang.String campaignType, android.os.Bundle eventPayload)
-
createButtonIntent
public android.content.Intent createButtonIntent(android.content.Context context, android.os.Bundle msg, SwrveNotificationButton.ActionType actionType, boolean isDismissAction)
-
createPendingIntent
protected android.app.PendingIntent createPendingIntent(android.os.Bundle msg, java.lang.String campaignType, android.os.Bundle eventPayload)
-
getIntentClass
public java.lang.Class getIntentClass(int sdkVersion, boolean isDismissAction)
-
getPendingIntent
protected android.app.PendingIntent getPendingIntent(int sdkVersion, android.content.Intent intent, int flags, boolean isDismissAction)
-
getNow
protected java.util.Date getNow()
-
getImageFromUrl
protected android.graphics.Bitmap getImageFromUrl(java.lang.String url)
-
downloadBitmapImageFromUrl
protected android.graphics.Bitmap downloadBitmapImageFromUrl(java.lang.String mediaUrl)
-
getImageFromCache
protected android.graphics.Bitmap getImageFromCache(java.lang.String url)
-
getSDKVersion
protected int getSDKVersion()
-
getNotificationId
public int getNotificationId()
-
getNotificationDetails
public SwrveNotificationDetails getNotificationDetails()
-
-