このページはAIにより自動翻訳されており、不正確な内容が含まれている可能性があります。翻訳の誤りを報告するには、 GitHubでイシューを作成してください.
Androidオブジェクト
android_pushオブジェクトを使用すると、メッセージングエンドポイントを介してAndroidプッシュ通知およびAndroidプッシュアラートコンテンツに関連する情報を定義またはリクエストできます。
Androidプッシュオブジェクト
ターゲットにしたユーザーがAndroidデバイスでプッシュ通知を受信できるようにするには、messages にAndroidプッシュオブジェクトを含める必要があります。alert 文字列と extra オブジェクトの合計バイト数は4,000を超えないようにしてください。メッセージングAPIは、Googleが許容するメッセージサイズを超えるとエラーを返します。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
"alert": (required, string) the notification message,
"title": (required, string) the title that appears in the notification drawer,
"extra": (optional, object) additional keys and values to be sent in the push,
"message_variation_id": (optional, string) used when providing a campaign_id to specify which message variation this message should be tracked under (must be an Android Push Message),
"notification_channel_id": (optional, string) the channel ID the notification is sent with,
"priority": (optional, integer) the notification priority value,
"android_priority": (optional, string) the FCM sender priority,
"send_to_sync": (optional, if set to true we throw an error if "alert" or "title" is set),
"collapse_key": (optional, string) the collapse key for this message,
// Specifying "default" in the sound field plays the standard notification sound
"sound": (optional, string) the location of a custom notification sound within the app,
"custom_uri": (optional, string) a web URL, or Deep Link URI,
"use_webview": (optional, boolean) whether to open the web URL inside the app if the action is "URI", defaults to false,
"summary_text": (optional, string),
"time_to_live": (optional, integer (maximum of 2,419,200 seconds)),
"notification_id": (optional, integer),
"push_icon_image_url": (optional, string) an image URL for the large icon,
"accent_color": (optional, integer) accent color to be applied by the standard Style templates when presenting this notification, an RGB integer value,
"send_to_most_recent_device_only": (optional, boolean) defaults to false, if set to true, Braze only sends this push to a user's most recently used Android device, rather than all eligible Android devices,
"buttons" : (optional, array of Android push action button objects) push action buttons to display
"conversation_data" : (optional, Android Conversation Push Object) the data to be displayed through Conversation Push
}
extra オブジェクトにキー appboy_image_url を指定すると、「Big Picture」通知を送信できます。appboy_image_url の値は、画像がホストされている場所にリンクするURLである必要があります。画像は縦横比2:1にトリミングし、600×300px以上にしてください。
追加パラメータの詳細
| パラメータ | 詳細 |
|---|---|
priority |
このパラメータは -2 から 2 までの値を受け付けます。-2 は「MIN」優先度を表し、2 は「MAX」を表します。0 は「DEFAULT」値です。この範囲外の値が送信された場合、デフォルトは0になります。どの優先度レベルを使用するかについては、Androidの通知優先度を参照してください。 |
android_priority |
このパラメータは、FCM送信者の優先度を指定するために normal または high のいずれかの値を受け付けます。デフォルトでは、メッセージはプッシュ設定ページで構成されたデフォルトのFCM優先度で送信されます。値の違いが配信に与える影響の詳細については、Androidメッセージの優先度を参照してください。 |
collapse_key |
FCMは、1台のデバイスにつき同時に最大4つのコラプスキーしか保存できません。4つ以上のコラプスキーを使用する場合、FCMはどのキーが保持されるかを保証しません。BrazeはCampaign用にデフォルトでこれらのうちの1つを使用するため、Androidメッセージ用に追加のコラプスキーは最大3つまでに指定してください。 |
push_icon_image_url |
large iconパラメーターの値は、画像がホストされている場所にリンクするURLである必要があります。 画像は1:1のアスペクト比にトリミングし、40×40以上にしてください。 |
notification_channel |
これが指定されていない場合、BrazeはダッシュボードのフォールバックチャネルIDで通知ペイロードを送信しようとします。詳細については、通知チャネルを参照し、統合時の通知チャネルの定義ステップを参照してください。 |
send_to_sync |
send_to_sync メッセージの詳細については、Androidのサイレント通知を参照してください。 |
Androidプッシュアクションボタンオブジェクト
1
2
3
4
5
6
{
"text": (required, string) the button's text,
"action": (optional, string) one of "OPEN_APP", "URI", "DEEP_LINK", or "CLOSE", defaults to "OPEN_APP",
"uri": (optional, string) a web URL or Deep Link URI,
"use_webview": (optional, boolean) whether to open the web URL inside the app if the action is "URI", defaults to true
}
Android会話プッシュオブジェクト
このメッセージのコンセプトは、Android People and Conversationsのプッシュドキュメントに記載されているコンセプトに対応しています。
1
2
3
4
5
6
{
"shortcut_id" : (required, string) the sharing shortcut identifier,
"reply_person_id" : (required, string) the identifier of the Person this push is replying to,
"messages" : (required, array of Android Conversation Push Message Object),
"persons" : (required, array of Android Conversation Push Person Object)
}
Android会話プッシュメッセージオブジェクト
1
2
3
4
5
{
"text" : (required, string) the text of this message,
"timestamp" : (required, integer) the unix timestamp of when this message was sent,
"person_id" : (required, string) the Person identifier of this message's sender,
}
Android会話プッシュPersonオブジェクト
1
2
3
4
{
"id" : (required, string) the identifier of this Person,
"name" : (required, string) the display name of this Person
}
New Stuff!