Package io.outbound.sdk
Class PushNotification
- java.lang.Object
-
- io.outbound.sdk.PushNotification
-
public class PushNotification extends java.lang.ObjectThe PushNotification represents one notification send from Outbound to the device. A PushNotification is passed into the overridable methods ofOutboundServiceallowing you to implement your own logic around notifications.
-
-
Field Summary
Fields Modifier and Type Field and Description static Parcelable.CreatorCREATORRequired 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.BuildercreateNotificationBuilder(Context context)Creates aNotificationCompat.Builderconstructed with the customization provided by Outbound.intdescribeContents()java.lang.StringgetBody()java.lang.StringgetCategory()java.lang.StringgetDeeplink()Get the deeplink sent with the notification if any.intgetId()java.lang.StringgetInstanceId()java.lang.StringgetLgNotifFolder()java.lang.StringgetLgNotifImage()JSONObjectgetPayload()java.lang.StringgetSmNotifFolder()java.lang.StringgetSmNotifImage()java.lang.StringgetSoundFile()java.lang.StringgetSoundFolder()java.lang.StringgetTitle()booleanisSilent()java.lang.BooleanisSoundDefault()java.lang.BooleanisSoundSilent()booleanisTestMessage()booleanisUninstallTracker()booleanlinkHasBeenHandled()Determine if the deeplink in the notification (if any) has been handled by the SDK or not.voidsetLinkHandled()voidsetMainActivityLaunched()booleanwasMainActivityLaunched()Determine if the SDK fell back to the main activity when the notification was opened or not.voidwriteToParcel(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.Builderconstructed with the customization provided by Outbound.- Parameters:
context-- Returns:
-
-