创建Android通知

使用Adobe Campaign在Android设备上发送推送通知。 有关投放创建的全局概念,请参阅 此部分.

首先创建新投放。

使用Firebase Cloud Messaging,您可以选择两种类型的消息:

  • Data message,由客户端应用程序处理。

    消息将直接发送到移动应用程序,该应用程序将生成Android通知并将通知显示到设备。 数据消息仅包含您的自定义应用程序变量。

  • Notification message,由FCM SDK自动处理。

    FCM会代表客户端应用程序在用户设备上自动显示消息。 Notification messages contain a predefined set of parameters and options but can still be further personalized with custom application variables.

For more information on Firebase Cloud Messaging messages types, refer to FCM documentation.

Create a data message

  1. 转到 Campaign management > Deliveries.

  2. 单击 New

  3. 选择 Deliver on Android (android)Delivery template 下拉菜单。 添加 Label 投放。

  4. 单击 To 定义要定位的群体。 默认情况下, Subscriber application 目标映射。 单击 Add 来选择您的服务。

  5. Target type 窗口,选择 Subscribers of an Android mobile application 单击 Next.

  6. Service 下拉列表中,选择您之前创建的服务,然后选择应用程序并单击 Finish.
    Application variables 将根据在配置步骤中添加的内容自动添加。

  7. 选择 data message as Message Type.

  8. 编辑您的富通知。

  9. 您可以在之前配置的 Application variables (如果需要)。 Application variables 需要在Android服务中进行配置,并且是发送到移动设备的消息有效负荷的一部分。

  10. 单击 Save 并发送投放内容。

当在订阅者的Android移动设备上收到图像和网页时,应在推送通知中显示。

创建通知消息

注意

通知消息的其他选项仅在HTTP v1 API配置中可用。 有关更多信息,请参阅此🔗章节。

了解如何在视频中创建Android推送通知

  1. 转到 Campaign management > Deliveries.

  2. 单击 New

  3. Select Deliver on Android (android) in the Delivery template drop-down. 添加 Label 投放。

  4. Click To to define the population to target. 默认情况下, Subscriber application 目标映射。 单击 Add 来选择您的服务。

  5. Target type 窗口,选择 Subscribers of an Android mobile application 单击 Next.

  6. Service 下拉列表中,选择您之前创建的服务,然后选择应用程序并单击 Finish.

  7. 选择 notification message as Message Type.

  8. Add a title and edit your message. 使用个性化的推送通知 Notification options:

    • Channel ID:设置通知的渠道ID。 The app must create a channel with this channel ID before any notification with this channel ID is received.
    • Sound:设置设备收到通知时要播放的声音。
    • Color:设置通知的图标颜色。
    • Icon:将通知的图标设置为在用户档案的设备上显示。
    • Tag:设置用于替换通知抽屉中现有通知的标识符。
    • Click action:设置与用户单击您的通知关联的操作。

    有关 Notification options 以及如何填写这些字段,请参阅 FCM文档.

  9. If your application is configured with HTTP v1 API protocol, you can further personalize your push notification with the following HTTPV1 additional options:

    • Ticker:设置通知的滚动条文本。 仅适用于设置为Android 5.0 Lollipop的设备。
    • Image: Set the image's URL to be displayed in your notification.
    • Notification Count: Set the number of new unread information to display directly on the application icon.
    • Sticky:设置为true或false。 如果设置为false,则当用户单击通知时,该通知将自动被取消。 如果设置为true,则即使用户单击通知,也仍会显示通知。
    • Notification Priority:将通知的优先级设置为默认、最小、低或高。 有关更多信息,请参阅 FCM文档.
    • Visibility:将通知的可见性级别设置为公共、私有或机密。 有关更多信息,请参阅 FCM文档.

    有关 HTTP v1 additional options 以及如何填写这些字段,请参阅 FCM文档.

  10. 您可以在之前配置的 Application variables (如果需要)。 Application variables 需要在Android服务中进行配置,并且是发送到移动设备的消息有效负荷的一部分。

  11. 单击 Save 并发送投放内容。

当在订阅者的Android移动设备上收到图像和网页时,应在推送通知中显示。

在此页面上