-
public class MessageHandler.Companion
-
-
Field Summary
Fields Modifier and Type Field Description public final static MessageHandler.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final BooleancanHandleMessage(RemoteMessage message)KARTE経由で送信された通知メッセージであるか判定します。 final BooleancanHandleMessage(Map<String, String> data)KARTE経由で送信された通知メッセージであるか判定します。 final KarteAttributesextractKarteAttributes(RemoteMessage message)RemoteMessageからSDKが自動で処理するデータを取り出し、KarteAttributesインスタンスを返します。 final KarteAttributesextractKarteAttributes(Map<String, String> data)データメッセージからSDKが自動で処理するデータを取り出し、KarteAttributesインスタンスを返します。 final BooleanhandleMessage(Context context, RemoteMessage message, Intent defaultIntent)KARTE経由で送信された通知メッセージから、通知を作成・表示します。 final BooleanhandleMessage(Context context, Map<String, String> data, Intent defaultIntent)KARTE経由で送信された通知メッセージ(データメッセージ)から、通知を作成・表示します。 final BooleanhandleMessage(Context context, RemoteMessage message, Notification notification, Intent defaultIntent)KARTE経由で送信された通知メッセージから、通知を作成・表示します。 final BooleanhandleMessage(Context context, Map<String, String> data, Notification notification, Intent defaultIntent)KARTE経由で送信された通知メッセージ(データメッセージ)から、通知を作成・表示します。 final UnitcopyInfoToIntent(Map<String, String> data, Intent intent)プッシュ通知の開封イベントの送信に必要なパラメータをIntentにコピーします。 -
-
Method Detail
-
canHandleMessage
final Boolean canHandleMessage(RemoteMessage message)
KARTE経由で送信された通知メッセージであるか判定します。
- Parameters:
message- RemoteMessage
-
canHandleMessage
final Boolean canHandleMessage(Map<String, String> data)
KARTE経由で送信された通知メッセージであるか判定します。
- Parameters:
data- Map
-
extractKarteAttributes
final KarteAttributes extractKarteAttributes(RemoteMessage message)
RemoteMessageからSDKが自動で処理するデータを取り出し、KarteAttributesインスタンスを返します。
- Parameters:
message- RemoteMessage
-
extractKarteAttributes
final KarteAttributes extractKarteAttributes(Map<String, String> data)
データメッセージからSDKが自動で処理するデータを取り出し、KarteAttributesインスタンスを返します。
- Parameters:
data- Map
-
handleMessage
@JvmOverloads() final Boolean handleMessage(Context context, RemoteMessage message, Intent defaultIntent)
KARTE経由で送信された通知メッセージから、通知を作成・表示します。
-
handleMessage
@JvmOverloads() final Boolean handleMessage(Context context, Map<String, String> data, Intent defaultIntent)
KARTE経由で送信された通知メッセージ(データメッセージ)から、通知を作成・表示します。
-
handleMessage
@JvmOverloads() final Boolean handleMessage(Context context, RemoteMessage message, Notification notification, Intent defaultIntent)
KARTE経由で送信された通知メッセージから、通知を作成・表示します。
- Parameters:
context- Contextmessage- RemoteMessagenotification- Notification カスタマイズした通知オブジェクト。表示をカスタマイズする場合に指定します。defaultIntent- Intentディープリンクが未指定の場合や、ディープリンクに対応するアクティビティが存在しない場合に、開始するアクティビティの情報。
-
handleMessage
@JvmOverloads() final Boolean handleMessage(Context context, Map<String, String> data, Notification notification, Intent defaultIntent)
KARTE経由で送信された通知メッセージ(データメッセージ)から、通知を作成・表示します。
- Parameters:
context- Contextdata- Mapnotification- 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通知メッセージをクリックした際に開始するアクティビティの情報
-
-
-
-