このページはAIにより自動翻訳されており、不正確な内容が含まれている可能性があります。翻訳の誤りを報告するには、ページ右側の目次の下にあるフィードバックをご利用ください。
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を指定することで、「ビッグピクチャー」通知を送信できます。appboy_image_urlの値は、画像がホストされている場所へのURLである必要があります。画像は2:1のアスペクト比にトリミングし、少なくとも600 x 300 pxにする必要があります。
パラメーターの詳細
| パラメーター | 詳細 |
|---|---|
priority |
このパラメーターは-2から2までの値を受け付けます。-2は「MIN」優先度、2は「MAX」を表します。0は「DEFAULT」値です。この範囲外で送信された値はデフォルトで0になります。どの優先度レベルを使用するかの詳細については、Android通知の優先度を参照してください。 |
android_priority |
このパラメーターはFCM送信者の優先度を指定するためにnormalまたはhighの値を受け付けます。デフォルトでは、メッセージはプッシュ設定ページで構成されたデフォルトのFCM優先度で送信されます。異なる値が配信にどのように影響するかの詳細については、Androidメッセージの優先度を参照してください。 |
collapse_key |
FCMはデバイスごとに同時に最大4つの折りたたみキーのみを保存できます。4つ以上の折りたたみキーを使用すると、FCMはどのキーが保持されるか保証しません。Brazeはキャンペーンにデフォルトでこれらのうち1つを使用するため、Androidメッセージには追加の折りたたみキーを最大3つまで指定するようにしてください。 |
push_icon_image_url |
大きいアイコンパラメーターの値は、画像がホストされている場所へのURLである必要があります。 画像は1:1のアスペクト比にトリミングし、少なくとも40x40にする必要があります。 |
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!