Push notifications

更新时间:
复制 MD 格式

This topic describes how to push notifications from the console.

Go to the page

  1. Log on to the EMAS console and select the Mobile Push product.

  2. On the Mobile Push product page, choose Create Task > Push Notification from the navigation pane on the left to open the Push Notification page.

Push settings

The parameters that you need to configure vary based on the target platform. The following sections describe the parameters.

Android

1. Basic settings

Parameter

Description

Notification title

The title of the notification. It briefly describes the notification content.

Notification body

The main content of the notification. It provides detailed information.

Push target

The available options are as follows:

  1. All: Push to all devices.

  2. Specific devices: Push based on device IDs.

  3. Specific accounts: Push based on accounts that are bound to device IDs.

  4. Specific aliases: Push based on aliases that are bound to device IDs.

  5. Device tags: Push based on tags that are bound to device IDs.

Note
  1. If the push target is specific devices, accounts, or aliases, you can upload a file that contains the device IDs, accounts, or aliases.

  2. Upload a TXT file that is encoded in UTF-8 and is no larger than 30 MB. Each line in the file must contain one data record.

  3. Limits on the frequency of pushing to all devices: For the same AppKey and operating system (Android, iOS, or HarmonyOS), the minimum interval between two pushes to all devices is 1 second. In addition, you can push a maximum of 10 notifications (messages converted to notifications are counted as notifications) and 30 messages to all devices within 10 consecutive minutes.

Push timing

The time to send the push notification.

The options include the following:

• Send immediately

• Scheduled send: The scheduled time cannot be more than 7 days in the future.

Offline storage

The duration for which the notification is stored for offline devices. Users who come online after this period will not receive the push. The maximum offline storage duration is 72 hours.

Action on notification click

The action to perform after a user clicks the notification. The options include the following:

• Open application

• Open specific page: You must specify the page.

• Open specific URL: Enter the web page URL.

• No redirect

Channel ID

The channel ID for Android 8.0 or later. This parameter is required for devices that run Android 8.0 or later. Otherwise, notifications cannot be received. For more information, see the AndroidNotificationChannel parameter in Advanced Push API.

2. Configure vendor channels

Parameter

Description

Customize auxiliary pop-up content

Set the content for the auxiliary pop-up. This includes:

  • Activity to open after notification click: Specify the activity to open after the notification is clicked. For more information, see the AndroidPopupActivity parameter in Advanced Push API.

  • Auxiliary pop-up title: Set the title for the auxiliary pop-up. For limits, see the AndroidPopupTitle parameter in Advanced Push API.

  • Auxiliary pop-up body: Set the body content for the auxiliary pop-up. For limits, see the AndroidPopupBody parameter in Advanced Push API.

Truncate long text

Specifies whether to truncate long text. For limits, see the Trim parameter in Advanced Push API.

Notification channels and categories

Set the notification channels and categories. For limits, see the description in Advanced Push API.

Vendor-specific settings

Configure vendor-specific parameters, such as OPPO private message templates and Xiaomi channel_id.

3. Advanced settings

Parameter

Description

Display style

The display style of the notification. The options include the following:

• Standard mode: The default notification style with a simple title and content.

• Long text mode: Display more content in the notification.

• Large image mode: Display a large image in the notification.

• List mode: Display multiple list items in the notification.

Long text title

The title in long text mode. For limits, see the AndroidBigTitle parameter in Advanced Push API.

Long text body

The body content in long text mode. For limits, see the AndroidBigBody parameter in Advanced Push API.

Large image URL

The image URL in large image mode. For limits, see the AndroidBigPictureUrl parameter in Advanced Push API.

List items

The list text in list mode. This parameter must be passed in JSON map format. Otherwise, parsing will fail. For limits, see the AndroidInboxBody parameter in Advanced Push API.

Alert type

The device alert type. The options include the following:

• Vibrate

• Sound

• Vibrate & Sound

• Silent

Notification ID

The notification ID. For limits, see the AndroidNotificationNotifyId parameter in Advanced Push API.

Group ID

The group ID. For messages in the same group, only the latest message and the total number of received messages in that group are displayed in the notification bar. All messages are not displayed and cannot be expanded. For limits, see the AndroidNotificationThreadId parameter in Advanced Push API.

Custom ID

The custom ID. If JobKey is not empty, this field is included in the receipt log.

Notification badge

Fully qualified class name: The fully qualified class name of the application entry Activity for the badge setting. This is effective only for pushes through Huawei/Honor vendor channels. For more information, see the AndroidBadgeClass parameter in Advanced Push API.

Badge setting:

  • Auto increment: Set the value to add to the badge number. For more information, see the AndroidBadgeAddNum parameter in Advanced Push API.

  • Custom value: Set a fixed value for the badge number. For more information, see the AndroidBadgeSetNum parameter in Advanced Push API.

Custom parameters

Set the extended properties of the notification. This parameter must be passed in JSON map format. Otherwise, parsing will fail.

iOS

Basic notification

1. Basic settings

Parameter

Description

Notification title

The title of the notification. It briefly describes the notification content.

Notification subtitle

The subtitle for notifications on devices that run iOS 10 or later. The subtitle is displayed below the notification title to provide additional information.

Notification body

The main content of the notification. It provides detailed information.

Push environment

Select the push environment.

The options include the following:

• Production environment: For applications distributed through the App Store, TestFlight, Ad Hoc, or enterprise distribution.

• Development environment: For applications installed and debugged directly from Xcode.

Push target

The available options are as follows:

  1. All: Push to all devices.

  2. Specific devices: Push based on device IDs.

  3. Specific accounts: Push based on accounts that are bound to device IDs.

  4. Specific aliases: Push based on aliases that are bound to device IDs.

  5. Device tags: Push based on tags that are bound to device IDs.

Note
  1. If the push target is specific devices, accounts, or aliases, you can upload a file that contains the device IDs, accounts, or aliases.

  2. Upload a TXT file that is encoded in UTF-8 and is no larger than 30 MB. Each line in the file must contain one data record.

  3. Limits on the frequency of pushing to all devices: For the same AppKey and operating system (Android, iOS, or HarmonyOS), the minimum interval between two pushes to all devices is 1 second. In addition, you can push a maximum of 10 notifications (messages converted to notifications are counted as notifications) and 30 messages to all devices within 10 consecutive minutes.

Push timing

The time to send the push notification.

The options include the following:

• Send immediately

• Scheduled send: The scheduled time cannot be more than 7 days in the future.

2. Advanced settings

Parameter

Description

Follow-up action

The action to perform after a user clicks the notification.

The options include the following: Open application.

Silent notification

Specifies whether to enable silent notifications.

Mutable-Content

The notification processing extension flag. This must be set to true for silent notifications.

Interruption level

The interruption level.

Custom parameters

Set the extended properties of the notification.

This parameter must be passed in JSON map format. Otherwise, parsing will fail.

Notification ID

The notification ID. For limits, see the description of the iOSNotificationCollapseId parameter in Advanced Push API.

Group ID

The group ID. For limits, see the description of the iOSNotificationThreadId parameter in Advanced Push API.

Category

The category. For limits, see the description of the iOSNotificationCategory parameter in Advanced Push API.

Notification sound

Sets the notification sound. For more information, see the parameters in Advanced Push API.

iOSMusic description.

Notification badge

Configure the notification badge using the following options:

• Auto increment: For more information about limits, refer to the parameter in Push Advanced API.

Description of iOSBadgeAutoIncrement

• Custom values: You can specify limits in the parameters of the Push Advanced Interface.

iOSBadge description.

Custom parameters

Set the extended properties of the notification. This parameter must be passed in JSON map format. Otherwise, parsing will fail.

HarmonyOS Client

1. Basic settings

Parameter

Description

Notification title

The title of the notification. It briefly describes the notification content.

Notification body

The main content of the notification. It provides detailed information.

Push target

The available options are as follows:

  1. All: Push to all devices.

  2. Specific devices: Push based on device IDs.

  3. Specific accounts: Push based on accounts that are bound to device IDs.

  4. Specific aliases: Push based on aliases that are bound to device IDs.

  5. Device tags: Push based on tags that are bound to device IDs.

Note
  1. If the push target is specific devices, accounts, or aliases, you can upload a file that contains the device IDs, accounts, or aliases.

  2. Upload a TXT file that is encoded in UTF-8 and is no larger than 30 MB. Each line in the file must contain one data record.

  3. Limits on the frequency of pushing to all devices: For the same AppKey and operating system (Android, iOS, or HarmonyOS), the minimum interval between two pushes to all devices is 1 second. In addition, you can push a maximum of 10 notifications (messages converted to notifications are counted as notifications) and 30 messages to all devices within 10 consecutive minutes.

Push timing

The time to send the push notification.

The options include the following:

• Send immediately

• Scheduled send: The scheduled time cannot be more than 7 days in the future.

Offline storage

The duration for which the notification is stored for offline devices. Users who come online after this period will not receive the push. The maximum offline storage duration is 72 hours.

2. Advanced settings

Parameter

Description

Notification badge

Set the notification badge. Options include

  • Auto increment: Set the value to add to the badge number. For more information, see the HarmonyBadgeAddNum parameter in Advanced Push API.

  • Custom value: Set a fixed value for the badge number. For more information, see the HarmonyBadgeSetNum parameter in Advanced Push API.

Follow-up action

The action to perform after a user clicks the notification. The options include the following:

• Open application homepage

• Open custom application page: You must configure either the Action or Uri for the custom page. For information about Action and Uri, see the descriptions of the action and uri parameters in the HarmonyOS ClickAction documentation.

Custom parameters

Set the extended properties of the notification. This parameter must be passed in JSON map format. Otherwise, parsing will fail.

3. HarmonyOS settings

Parameter

Description

Notification message category

The HarmonyOS vendor channel manages the alert types, display locations, and push quantities of notifications based on their categories. For standards, see the HarmonyOS developer documentation. This is used for the Notification.category field of the HarmonyOS push API.

Notification channel type

HarmonyOS supports multiple notification channel types, each with different alert types. For a description of the types, see the HarmonyOS developer documentation. This is used for the NotificationRequest.notificationSlotType field of the HarmonyOS notification creation API.

Enable test message

The flag to enable test messages in the HarmonyOS channel push configuration. For more information, see the description of the testMessage parameter in the HarmonyOS developer documentation.

Push Notifications

  1. After you complete the configuration, click Push Notification to send the notification.