Class PushPayload.Builder

java.lang.Object
com.sap.mobile.services.client.push.PushPayload.Builder
Enclosing interface:
PushPayload

public static final class PushPayload.Builder extends Object
The generic notification definition.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • alert

      public PushPayload.Builder alert(String alert)
      Alert properties define the notification message. The push provider displays the notification message directly on the device or browser (for W3C Push). See the specific push provider section for additional information. Use plain text for alerts so the notification can be handled by multiple push providers.
    • badge

      public PushPayload.Builder badge(Integer badge)
      The number to display in a badge on your app’s icon. Specify 0 to remove the current badge, if any.
    • sound

      public PushPayload.Builder sound(String sound)
      When specified, play a sound when the notification arrives on the device. See the push provider for details.
    • priority

      public PushPayload.Builder priority(String priority)
      The notification priority. Allowed values are HIGH and NORMAL
    • data

      public PushPayload.Builder data(String data)
      The data property is a serialized / escape JSON key/value map. The object is not shown in the notification, but can be used by the mobile app notification handler. Android only support maps/key String value pairs. Other JSON objects will be rejected.
    • data

      public PushPayload.Builder data(Object data) throws com.fasterxml.jackson.core.JsonProcessingException
      The data is a key/value map. The object is not shown in the notification, but can be used by the mobile app notification handler. Android only support maps/key String value pairs. Other JSON objects will be rejected.
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • sendAsSms

      public PushPayload.Builder sendAsSms(Boolean sendAsSms)
      Send notification as SMS. @deprecated
    • apns

      APNS specific notification properties that overrides the PushPayload properties
    • gcm

      FCM specific notification properties that overrides the PushPayload properties
    • wns

      WNS specific notification properties that overrides the PushPayload properties
    • baidu

      public PushPayload.Builder baidu(BaiduNotification baidu)
      Baidu specific notification properties that overrides the PushPayload properties
    • w3c

      W3C specific notification properties that overrides the PushPayload properties
    • custom

      public PushPayload.Builder custom(Map<String,String> custom)
      Custom specific notification properties that overrides the PushPayload properties
    • build

      public PushPayload build()