Class BatchMessage

    • Field Detail

      • MESSAGING_EXTRA_PAYLOAD_KEY

        public static final java.lang.String MESSAGING_EXTRA_PAYLOAD_KEY
        Key to retrieve the messaging payload (if applicable) from an extra
        See Also:
        Constant Field Values
    • Constructor Detail

      • BatchMessage

        public BatchMessage()
    • Method Detail

      • getJSON

        protected abstract JSONObject getJSON()
      • getCustomPayloadInternal

        protected abstract JSONObject getCustomPayloadInternal()
      • writeToBundle

        public void writeToBundle​(@NonNull
                                  android.os.Bundle bundle)
      • writeToIntent

        public void writeToIntent​(@NonNull
                                  android.content.Intent intent)
      • getFormat

        public BatchMessage.Format getFormat()
        Returns the format of the displayable message, if any.

        You should cache this result rather than access the getter multiple times, as it involves some computation.

        Note: This getter bypasses most of the checks of the message's internal representation. Having a valid format returned here does not mean that other operations (such as Batch.Messaging.loadFragment(Context, BatchMessage)) will succeed.

        Returns:
        the format of the displayable message, if any.
      • getKind

        protected abstract java.lang.String getKind()
      • getBundleRepresentation

        protected abstract android.os.Bundle getBundleRepresentation()