Class NotificationPayload

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,​java.lang.Object>, Payload

    public class NotificationPayload
    extends java.util.HashMap<java.lang.String,​java.lang.Object>
    implements Payload
    通知ペイロードを表すクラス。 いくつかの事前定義されたパラメータが存在する。
    FCMの場合、
    title、body、icon、soundなどを設定可能(詳細はFirebaseのドキュメント参照のこと)。
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String BODY
      通知の本文テキストを設定する際のkey。
      iOS、Androidで指定可能。
      static java.lang.String ICON
      通知アイコンを設定する際のkey。
      Androidで指定可能かつ必須。
      static java.lang.String TITLE
      通知のタイトルを設定する際のkey。
      iOS(ウォッチ)、Androidで指定可能。
      Androidの場合必須。
    • Constructor Summary

      Constructors 
      Constructor Description
      NotificationPayload()  
      NotificationPayload​(java.lang.String body)
      指定のbodyで通知を構築する。
      NotificationPayload​(java.lang.String title, java.lang.String body, java.lang.String icon)
      指定のtitle,body,iconで通知を構築する。
    • Method Summary

      Modifier and Type Method Description
      java.lang.Object get​(java.lang.String key)  
      • Methods inherited from class java.util.HashMap

        clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
      • Methods inherited from class java.util.AbstractMap

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        equals, hashCode
      • Methods inherited from interface org.iplass.mtp.pushnotification.Payload

        keySet, put
    • Field Detail

      • TITLE

        public static final java.lang.String TITLE
        通知のタイトルを設定する際のkey。
        iOS(ウォッチ)、Androidで指定可能。
        Androidの場合必須。
        See Also:
        Constant Field Values
      • BODY

        public static final java.lang.String BODY
        通知の本文テキストを設定する際のkey。
        iOS、Androidで指定可能。
        See Also:
        Constant Field Values
      • ICON

        public static final java.lang.String ICON
        通知アイコンを設定する際のkey。
        Androidで指定可能かつ必須。
        See Also:
        Constant Field Values
    • Constructor Detail

      • NotificationPayload

        public NotificationPayload()
      • NotificationPayload

        public NotificationPayload​(java.lang.String title,
                                   java.lang.String body,
                                   java.lang.String icon)
        指定のtitle,body,iconで通知を構築する。
        Parameters:
        title -
        body -
        icon -
      • NotificationPayload

        public NotificationPayload​(java.lang.String body)
        指定のbodyで通知を構築する。
        Parameters:
        body -
    • Method Detail

      • get

        public java.lang.Object get​(java.lang.String key)
        Specified by:
        get in interface Payload