Package 

Object MessageHandler.Companion

    • Method Detail

      • canHandleMessage

         final Boolean canHandleMessage(RemoteMessage message)

        KARTE経由で送信された通知メッセージであるか判定します。

        Parameters:
        message - RemoteMessage
      • handleMessage

        @JvmOverloads() final Boolean handleMessage(Context context, RemoteMessage message, Intent defaultIntent)

        KARTE経由で送信された通知メッセージから、通知を作成・表示します。

        Parameters:
        context - Context
        message - RemoteMessage
        defaultIntent - Intentディープリンクが未指定の場合や、ディープリンクに対応するアクティビティが存在しない場合に、開始するアクティビティの情報。
      • handleMessage

        @JvmOverloads() final Boolean handleMessage(Context context, Map<String, String> data, Intent defaultIntent)

        KARTE経由で送信された通知メッセージ(データメッセージ)から、通知を作成・表示します。

        Parameters:
        context - Context
        data - Map
        defaultIntent - Intentディープリンクが未指定の場合や、ディープリンクに対応するアクティビティが存在しない場合に、開始するアクティビティの情報。
      • handleMessage

        @JvmOverloads() final Boolean handleMessage(Context context, RemoteMessage message, Notification notification, Intent defaultIntent)

        KARTE経由で送信された通知メッセージから、通知を作成・表示します。

        Parameters:
        context - Context
        message - RemoteMessage
        notification - Notification カスタマイズした通知オブジェクト。表示をカスタマイズする場合に指定します。
        defaultIntent - Intentディープリンクが未指定の場合や、ディープリンクに対応するアクティビティが存在しない場合に、開始するアクティビティの情報。
      • handleMessage

        @JvmOverloads() final Boolean handleMessage(Context context, Map<String, String> data, Notification notification, Intent defaultIntent)

        KARTE経由で送信された通知メッセージ(データメッセージ)から、通知を作成・表示します。

        Parameters:
        context - Context
        data - Map
        notification - Notification カスタマイズした通知オブジェクト。表示をカスタマイズする場合に指定します。
        defaultIntent - Intentディープリンクが未指定の場合や、ディープリンクに対応するアクティビティが存在しない場合に、開始するアクティビティの情報。
      • copyInfoToIntent

        @Deprecated(message = "This method has restrictions on click measurement. If you want to show custom notification, pass Notification instance to 'handleMessage(Context,Map<String, String>,Notification?,Intent?): Boolean'.", replaceWith = @ReplaceWith(imports = {}, expression = "MessageHandler.handleMessage(context, data, notification, intent)")) final Unit copyInfoToIntent(Map<String, String> data, Intent intent)

        プッシュ通知の開封イベントの送信に必要なパラメータをIntentにコピーします。

        Parameters:
        data - 通知データ
        intent - Intent通知メッセージをクリックした際に開始するアクティビティの情報