Package 

Class BatchPushPayload

    • Method Detail

      • payloadFromBundle

         static BatchPushPayload payloadFromBundle(@Nullable() Bundle bundle)

        Attempt to extract the Batch Push data contained within the specified Bundle.This is usually the method you want to use when reading this payload from an activity opened by Batch,or when you wrote an existing BatchPushPayload to a Bundle/Intent extras using writeToBundle / writeToIntentExtras.

        Parameters:
        bundle - Bundle containing Batch Push data.
      • payloadFromReceiverIntent

         static BatchPushPayload payloadFromReceiverIntent(@NonNull() Intent intent)

        Attempt to extract the Batch Push data contained within the specified Intent.This is usually the method you want to use when reading this payload from a push broadcast receiver/service, NOT from an activity intent.If you wrote an existing BatchPushPayload to a Bundle/Intent extras using writeToBundle / writeToIntentExtras, you should rather use payloadFromBundle

        Parameters:
        intent - Broadcast receiver intent containing Batch Push data.
      • payloadFromReceiverExtras

         static BatchPushPayload payloadFromReceiverExtras(@NonNull() Bundle extras)

        Attempt to extract the Batch Push data contained within the specified Intent extras.This is usually the method you want to use when reading this payload from a push broadcast receiver/service, NOT from an activity intent.If you wrote an existing BatchPushPayload to a Bundle/Intent extras using writeToBundle / writeToIntentExtras, you should rather use payloadFromBundle

        Parameters:
        extras - Broadcast receiver intent's extras containing Batch Push data.
      • payloadFromFirebaseMessage

         static BatchPushPayload payloadFromFirebaseMessage(@NonNull() RemoteMessage remoteMessage)

        Attempt to extract the Batch Push data contained within the specified Firebase RemoteMessage.This is usually the method you want to use when reading this payload from a FirebaseMessagingService implementation, NOT from an activity intent.If you wrote an existing BatchPushPayload to a Bundle/Intent extras using writeToBundle / writeToIntentExtras, you should rather use payloadFromBundle

        Parameters:
        remoteMessage - Firebase remote message containing Batch Push data.
      • writeToBundle

         void writeToBundle(@NonNull() Bundle bundle)

        Serialize this instance into a Bundle.Note that you'll need to use payloadFromBundle with the intent's extras to read it back.

        Parameters:
        bundle - Bundle instance to serialize this in
      • hasDeeplink

         boolean hasDeeplink()

        Does this push contains a deeplink

      • getDeeplink

         String getDeeplink()

        Get the deeplink url contained in this push.You should always check if the push contains a deeplink using hasDeeplink

      • hasCustomLargeIcon

         boolean hasCustomLargeIcon()

        Does this push contains a custom large icon

      • getCustomLargeIconURL

         String getCustomLargeIconURL(Context context)

        Get the custom large icon url contained in this push.You should always check if the push contains a custom large icon using hasCustomLargeIcon.The url returned by this method is already optimized for the device, you have to download the image and use it in the notification

      • hasBigPicture

         boolean hasBigPicture()

        Does this push contains a big picture

      • getBigPictureURL

         String getBigPictureURL(Context context)

        Get the big picture url contained in this push.You should always check if the push contains a big picture using hasBigPicture.The url returned by this method is already optimized for the device, you have to download the image and use it in the notification

      • hasLandingMessage

         boolean hasLandingMessage()

        Whether the payload contains a landing message or not