Package io.outbound.sdk
Class PushNotification
- java.lang.Object
-
- io.outbound.sdk.PushNotification
-
public class PushNotification extends java.lang.Object
The PushNotification represents one notification send from Outbound to the device. A PushNotification is passed into the overridable methods ofOutboundService
allowing you to implement your own logic around notifications.
-
-
Field Summary
Fields Modifier and Type Field and Description static Parcelable.Creator
CREATOR
Required methods to implementandroid.os.Parcelable
-
Constructor Summary
Constructors Constructor and Description PushNotification(Bundle data)
PushNotification(Parcel in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description NotificationCompat.Builder
createNotificationBuilder(Context context)
Creates aNotificationCompat.Builder
constructed with the customization provided by Outbound.int
describeContents()
java.lang.String
getBody()
java.lang.String
getCategory()
java.lang.String
getDeeplink()
Get the deeplink sent with the notification if any.int
getId()
java.lang.String
getInstanceId()
java.lang.String
getLgNotifFolder()
java.lang.String
getLgNotifImage()
JSONObject
getPayload()
java.lang.String
getSmNotifFolder()
java.lang.String
getSmNotifImage()
java.lang.String
getSoundFile()
java.lang.String
getSoundFolder()
java.lang.String
getTitle()
boolean
isSilent()
java.lang.Boolean
isSoundDefault()
java.lang.Boolean
isSoundSilent()
boolean
isTestMessage()
boolean
isUninstallTracker()
boolean
linkHasBeenHandled()
Determine if the deeplink in the notification (if any) has been handled by the SDK or not.void
setLinkHandled()
void
setMainActivityLaunched()
boolean
wasMainActivityLaunched()
Determine if the SDK fell back to the main activity when the notification was opened or not.void
writeToParcel(Parcel dest, int flags)
-
-
-
Method Detail
-
describeContents
public int describeContents()
-
writeToParcel
public void writeToParcel(Parcel dest, int flags)
-
isSilent
public boolean isSilent()
-
isUninstallTracker
public boolean isUninstallTracker()
-
isTestMessage
public boolean isTestMessage()
-
getId
public int getId()
-
getInstanceId
public java.lang.String getInstanceId()
-
getDeeplink
public java.lang.String getDeeplink()
Get the deeplink sent with the notification if any.- Returns:
- the URL or null
-
getTitle
public java.lang.String getTitle()
-
getBody
public java.lang.String getBody()
-
getCategory
public java.lang.String getCategory()
-
getPayload
public JSONObject getPayload()
-
getLgNotifFolder
public java.lang.String getLgNotifFolder()
-
getLgNotifImage
public java.lang.String getLgNotifImage()
-
getSmNotifFolder
public java.lang.String getSmNotifFolder()
-
getSmNotifImage
public java.lang.String getSmNotifImage()
-
isSoundSilent
public java.lang.Boolean isSoundSilent()
-
isSoundDefault
public java.lang.Boolean isSoundDefault()
-
getSoundFile
public java.lang.String getSoundFile()
-
getSoundFolder
public java.lang.String getSoundFolder()
-
linkHasBeenHandled
public boolean linkHasBeenHandled()
Determine if the deeplink in the notification (if any) has been handled by the SDK or not.- Returns:
-
setLinkHandled
public void setLinkHandled()
-
setMainActivityLaunched
public void setMainActivityLaunched()
-
wasMainActivityLaunched
public boolean wasMainActivityLaunched()
Determine if the SDK fell back to the main activity when the notification was opened or not.- Returns:
-
createNotificationBuilder
public NotificationCompat.Builder createNotificationBuilder(Context context)
Creates aNotificationCompat.Builder
constructed with the customization provided by Outbound.- Parameters:
context
-- Returns:
-
-