Skip to content

Objeto Android

El objeto android_push le permite definir o solicitar información relacionada con el contenido de Android Push y Android Push Alert a través de nuestros puntos finales de mensajería.

Objeto push de Android

Debes incluir un objeto push de Android en messages si quieres que los usuarios a los que te has dirigido reciban un push en sus dispositivos Android. El número total de bytes de tu cadena alert y del objeto extra no debe superar los 4.000. La API de mensajería devolverá un error si superas el tamaño de mensaje permitido por 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 will be 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 will 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 will play 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 will only send 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
}

Puedes enviar notificaciones “Big Picture” especificando la clave appboy_image_url en el objeto extra. El valor de appboy_image_url debe ser una URL que enlace a donde esté alojada tu imagen. Las imágenes deben recortarse a una relación de aspecto de 2:1 y deben tener al menos 600 x 300 px.

Detalles adicionales de los parámetros

Objeto botón de acción push de 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
}

Conversación Android objeto push

Los conceptos de este mensaje corresponden a los de la documentación sobre Android People y Conversaciones push.

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)
}

Objeto de mensaje push de conversación 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,
}

Objeto de persona push de conversación de Android

1
2
3
4
{
  "id" : (required, string) the identifier of this Person,
  "name" : (required, string) the display name of this Person
}
¿QUÉ TAN ÚTIL FUE ESTA PÁGINA?
New Stuff!