Skip to content

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 x 300 px 이상이어야 합니다.

추가 파라미터 세부 정보

파라미터 세부 정보
priority 이 파라미터는 -2에서 2까지의 값을 허용하며, -2는 “MIN” 우선순위, 2는 “MAX” 우선순위를 나타냅니다. 0은 “DEFAULT” 값입니다.

이 범위를 벗어나는 값은 기본값 0으로 설정됩니다. 어떤 우선순위 수준을 사용해야 하는지에 대한 자세한 내용은 Android 알림 우선순위를 참조하세요.
android_priority 이 파라미터는 normal 또는 high 값을 허용하여 FCM 발신자 우선순위를 지정합니다. 기본적으로 메시지는 푸시 설정 페이지에서 구성한 기본 FCM 우선순위로 전송됩니다.

다양한 값이 전달에 미치는 영향에 대한 자세한 내용은 Android 메시지 우선순위를 참조하세요.
collapse_key FCM은 기기당 최대 4개의 축소 키만 동시에 저장할 수 있습니다. 4개 이상의 축소 키를 사용하는 경우, FCM은 어떤 키가 유지되는지 보장하지 않습니다. Braze는 Campaigns에 대해 기본적으로 이 중 하나를 사용하므로, 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 사용자 및 대화 푸시 설명서에 나와 있는 개념과 일치합니다.

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 대화 푸시 사람 오브젝트

1
2
3
4
{
  "id" : (required, string) the identifier of this Person,
  "name" : (required, string) the display name of this Person
}
New Stuff!