This topic describes how to push live activities using the console.
Access the page
Log on to the EMAS Management Console. Select the Mobile Push product.
On the Mobile Push product page, select Create Task > Push Live Activities from the navigation pane on the left. This opens the Push Live Activities page.
Parameters vary by target platform. Parameter descriptions follow:
Android
Huawei Live Window
1. Basic configurations
Parameter |
Description |
Push target |
Options include the following:
Note
|
Push time |
Set the send time for this push. Options include the following: • Send immediately • Scheduled send: Cannot exceed 7 days. |
Non-basic configurations fully comply with Huawei Live Window’s official specifications. All parameters pass through to Huawei without modification or encapsulation. For complete configuration options and the latest features, see Huawei Live Window Notifications.
2. Live Window configurations
Parameter |
Description |
Live Window notification operation type |
Specify the operation type for Live Window notifications. Options include the following:
|
Live Window ID |
The unique Live Window ID, generated by the developer, corresponds to
Important
If the Live Window notification corresponding to the sent activityId does not exist, sending Live Window notifications with that activityId is restricted for 24 hours. |
Business scenario |
For business scenario values and usage limits, see the `event` in Huawei Live Window Push Guide. |
Vendor channel notification type |
Vendor channel notification types include the following:
|
Fallback notification title |
Content displayed in the notification bar when the system does not support Live Window notifications. |
Fallback notification content |
Content displayed in the notification bar when the system does not support Live Window notifications. |
Silent notification |
Indicate whether message updates require an alert.
|
Live Window version number |
The version number for updating Live Window notifications (default is 0). It must be greater than or equal to 0. The new Live Window notification version number must be greater than the current Live Window notification version number; otherwise, the refresh fails. |
3. Message notification configurations
Configure Live Window message notification layout data in this section. For corresponding fields, see the NotificationData struct. Required parameters vary by layout type.
Parameter |
Description |
Layout type |
Options include the following:
|
Common parameters:
Parameter |
Description |
Archive period |
The Live Window notification archive period. This is the duration the notification remains in the notification center after the Live Window notification ends. The default is 0 (no retention), with a maximum of 1 hour, in seconds (s). |
Notification title |
The notification title, with a maximum length of 1024 characters. |
Notification content |
The notification content, with a maximum length of 1024 characters. The application can set the color of some text within the string, but only one color is allowed. |
Display line separator |
Control whether to display the line separator in the extended area. |
Auxiliary area display type |
For auxiliary area styles, see the Extend struct. Note
|
Click behavior type |
For click behavior in the auxiliary area, see the definition of the ClickAction struct. |
Custom data |
Custom message payload, passed to the application on click, in key-value format. Example: {"name": "john", age: 10}. |
Basic template-specific parameters:
Parameter |
Description |
Large image icon |
Local resource path, with a length limit of 1–255 characters. If not provided, the system uses the last refreshed image. Convert SVG resources to VectorDrawable and place them in the drawable directory. Example: If the icon file icon.png is in /res/raw/, the value is /res/raw/icon. |
Overlay application icon |
Whether to overlay the application icon when a large image icon exists. |
Maximum progress value |
The maximum progress value, which must be greater than 0. |
Current progress value |
The current progress value, which must be greater than or equal to 0 and less than or equal to the maximum progress value. |
Infinite loop |
Whether it is an infinite loop style:
|
Progress visualization type:
Parameter |
Description |
Progress percentage |
Progress value from 0-100, which determines the indicator's position on the progress bar. |
Indicator icon |
The indicator icon for the progress bar chart is a local resource. If this icon fails to load, the system displays the version from the last refresh. Example: If the icon file “icon.png” is in the application's “/res/raw” path, the value is “/res/raw/icon”. |
Progress color |
The color of the progress points and node icons to the left of the progress indicator, in "#ARGB" hexadecimal format. The default is blue. |
Background color |
The color of the progress points and node icons to the right of the progress indicator, in "#ARGB" hexadecimal format. The default is gray. |
Node icons |
Icons for each node on the progress bar. The array length ranges from [2,5]. These are local resources, separated by commas if multiple. Required during creation. For details, see nodeIcons in NotificationData. |
Progress display type |
Extended area progress display types:
|
Indicator display type |
Extended area indicator small icon display types:
|
Emphasized text template-specific parameters:
Parameter |
Description |
First line text |
First line text, up to 128 characters. |
Second line text |
Second line text content, up to 128 characters. |
Underline color |
Specifies the underline color for the text in the #ARGB hexadecimal format. If you do not specify a color, no underline is displayed. |
Description image |
The description image for the extended area. It does not display by default. If a value is passed, it displays in the extended area on the right side of the notification. If no value is passed, the last image is used. For details, see the descPic field in NotificationData. |
Left-right text template-specific parameters:
Left text block
Parameter
Description
First line text
First line text, up to 128 characters.
Second line text
Second line text content, up to 128 characters.
Left text block
Parameter
Description
First line text
First line text, up to 128 characters.
Second line text
Second line text content, up to 128 characters.
Separator icon
Local resource, occupies the center of the extended area.
Event type-specific parameters:
Home team
Parameter
Description
Home team icon
Team icon for the display area. For SVG resources, convert them to VectorDrawable resources and place the converted resources in the drawable directory.
Example: If the icon file “icon.png” is in the application's “/res/raw” path, the value is “/res/raw/icon”.
Home team name
The team name.
Home team score
The event score.
Away team
Parameter
Description
Away team icon
Team icon for the display area. For SVG resources, convert them to VectorDrawable resources and place the converted resources in the drawable directory.
Example: If the icon file “icon.png” is in the application's “/res/raw” path, the value is “/res/raw/icon”.
Away team name
The team name.
Away team score
The event score.
Match information
Parameter
Description
Match description
Description text above the center of the extended area.
Match time
Match time below the center of the extended area.
4. Capsule layout
In this section, enable the capsule layout using a toggle button and configure capsule notification layout data. For corresponding fields, see the CapsuleData struct.
Parameter |
Description |
Capsule type |
Capsule layout types:
|
Capsule status |
When the Live Window notification is not visible, the application's live service displays as a Live Window capsule in the status bar. Options include the following:
|
Status icon |
Status icon, local resource. Use SVG format resources. |
Alert |
Whether to alert the user with animation during this capsule update. The number of alerts does not exceed 5 times during the entire capsule period.
|
Capsule background color |
The capsule background color, in "#ARGB" hexadecimal format. To prevent issues such as transparent backgrounds or overly bright colors, the color is converted before the capsule displays. 1. Set alpha to 255 to force solid display. 2. For colors with high saturation and brightness, saturation and brightness are appropriately reduced. |
Capsule title |
The main text for the capsule status, up to 128 characters. When the capsule type is image and text, this field sets the capsule title. |
Capsule content |
The capsule status content, up to 128 characters. This extended text displays when the device is widescreen or in landscape orientation. When the capsule type is image and text or timer, this field sets the capsule content. |
Notification progress information:
Parameter |
Description |
Maximum progress value |
The maximum progress value, which must be greater than 0. |
Current progress value |
The current progress value, which must be greater than or equal to 0 and less than or equal to the maximum progress value. |
Infinite loop |
Whether it is an infinite loop style:
|
5. External screen display
In this section, enable the external screen display layout using a toggle button and configure display data for external screens, such as those on Pocket series phones. For corresponding fields, see the ExternalData struct.
Parameter |
Description |
External screen template type |
External screen template types:
|
External screen background color |
In "#RGB" hexadecimal format. If not set, the system default color is used. |
External screen notification title |
Custom external screen notification title, with a total length of up to 128 characters. If not set, the fallback notification title is used by default. |
External screen notification content |
Custom external screen notification content, composed of multiple RichText segments, with a total length of up to 128 characters. If not set, the fallback notification content is used by default. |
External screen background image |
External screen background image, local resource. When the external screen template type is a background image type, set it during the first image creation. It is optional for subsequent updates. |
iOS Dynamic Island
1. Basic settings
Parameter |
Description |
Notification title |
The title of the notification. It briefly describes the notification's content. |
Notification subtitle |
The subtitle for notifications on devices running iOS 10 or later. The subtitle appears below the notification title and provides extra information. |
Notification body |
The main content of the notification. It provides detailed information. |
Push environment |
Select the push environment. Options include the following: • Production environment • Development environment |
Push target |
The DeviceID. This is the unique identity of a device in the push service. |
Push timing |
Set the send time for this push. Options include the following: • Send now • Scheduled send: The scheduled time cannot be more than 7 days from now. |
2. Dynamic Island configuration
Parameter |
Description |
Live Activity event type |
The type of Live Activity event. It includes: • start: Starts a Live Activity. • update: Updates a Live Activity. • end: Ends a Live Activity. For limits, see the Event parameter of PushTask. |
Live Activity ID |
The Live Activity ID reported by the device to your server. For limits, see the Id parameter of PushTask. |
Data model |
The type of Live Activity to register. For limits, see the AttributesType parameter of PushTask. |
Expiration time |
The expiration time for the Dynamic Island activity. For limits, see the StaleDate parameter of PushTask. |
Static parameter |
Pass-through static parameters for the Dynamic Island push. The key-value pairs in the JSON are custom-defined by your service. For limits, see the Attributes parameter of PushTask. |
Dynamic parameter |
Pass-through dynamic parameters for the Dynamic Island push. The key-value pairs in the JSON are custom-defined by your service. For limits, see the ContentState parameter of PushTask. |
Lock screen dismissal time |
When a Live Activity ends, the Dynamic Island activity ends immediately. However, the Lock Screen activity remains until the dismissal time. For limits, see the DismissalDate parameter of PushTask. |
HarmonyOS Live View
1. Basic Configuration
Parameter |
Description |
Push Target |
Options:
Note
|
Push Timing |
Set when to send this push. Options: • Send immediately • Schedule send: Must be within 7 days. |
The non-basic configuration follows the official HarmonyOS Live View specification exactly. All parameters pass through to the system unchanged. For full configuration details and the latest features, see HarmonyOS Live View Notifications.
2. Live View Configuration
Parameter |
Description |
Live View Notification Operation Type |
Operation types for Live View messages:
When updating or ending a Live View, optional fields inherit the previous state if not provided and no default is defined. |
Live View Identity |
A unique identifier for the Live View. Valid values range from -2147483648 to 2147483647. Developers generate this value. Maps to the id field in Live View Kit.
Important
If the Live View with the specified activityId does not exist (in an update or end operation), that activityId cannot be used to send Live View messages for 24 hours. |
Business Scenario |
Valid business scenario values. For usage limits, see the event section in the HarmonyOS Live View Push Guide. |
Live View Message Status |
Required when the Live View notification operation type is Create, or when it is Update and the Live View being updated was created remotely via Mobile Push. Status values depend on the scenario type. See Status Values. To use the placeholder {{status}} in the message body, see Fields That Support Placeholders. When valid, the system replaces the placeholder with the target value. |
Vendor Channel Notification Type |
Vendor channel notification types:
|
Fallback Notification Title |
Text shown in the notification shade when the system does not support Live View notifications. |
Fallback Notification Content |
Text shown in the notification shade when the system does not support Live View notifications. |
Silent Notification |
Whether the message update triggers a user alert.
|
Live View Version Number |
Version number of the updated Live View notification. Must be greater than or equal to 0. The new version number must be greater than the current version number. Otherwise, the refresh fails. |
3. Message Notification Layout
Configure layout data for Live View message notifications in this section. For corresponding fields, see the NotificationData struct. Required parameters vary by layout type.
Parameter |
Description |
Layout Type |
Includes:
|
Common parameters:
Parameter |
Description |
Live View Keyword |
Keyword for the Live View. Required when the Live View notification operation type is Create and the business scenario is one of the following:
To use placeholders in the message body, see Fields That Support Placeholders. |
Archive Period |
How long the Live View notification remains in the notification center after ending. Default is 0 seconds (not archived). Maximum is 1 hour (3600 seconds). The archive period uses the value passed in the End operation. During the archive period, you cannot update or end the notification again. |
Notification Title |
Title of the notification. Maximum length is 1024 characters. Required when the Live View notification operation type is Create. Cannot be an empty string. |
Notification Content |
Content of the notification. Composed of multiple rich text (RichText) segments. Total length must not exceed 1024 characters. If you set text color, use only one color. Required when the Live View notification operation type is Create. Cannot be an empty string. |
Show Line Separator |
Whether to show the line separator in the expanded area.
|
Assistant Area Display Type |
Style of the assistant area. See the Extend struct for details. Note
|
Click Behavior Type |
Action taken when users tap the notification. See the ClickAction struct for details. |
Custom Data |
Data passed to your app when users tap the notification. See the data field in ClickAction for details. |
Lock Screen Immersive Image |
Image shown on the lock screen for immersive Live View. Value is the filename in the specified path. Example: If the icon file “icon.png” is stored in your app’s “/resources/rawfile” path, the value is “icon.png”. |
Progress visualization type:
Parameter |
Description |
Progress Percentage |
Progress value from 0 to 100. Determines the position of the indicator on the progress bar. |
Indicator Icon |
Local resource. When not included, the system displays the image from the last refresh. When the operation type is Create and the indicator display type As follows:
Required, and cannot be an empty string. |
Progress Color |
Color of the progress point on the left side of the progress bar and node icons. Format: "#ARGB" (9-character hexadecimal). Default is blue. |
Background Color |
Color of the progress point on the right side of the progress bar and node icons. Format: "#ARGB" (9-character hexadecimal). Default is gray. |
Node Icon |
Icon for each node on the progress bar. Array length must be between 2 and 5. Local resource. If omitted, the system displays the last refreshed image. Required when the operation type is Create. Cannot be an empty array of strings. |
Progress Display Type |
Progress display type in the expanded area:
|
Indicator Display Type |
Small indicator icon display type in the expanded area:
|
Emphasized text template layout — specific parameters:
Parameter |
Description |
First-line Text |
First-line text. Maximum length is 128 characters. Cannot be empty. |
Second-line Text |
Second-line text. Maximum length is 128 characters. Cannot be empty. |
Underline Color |
Underline color for the second-line text. Format: "#ARGB" (9-character hexadecimal). If not set, no underline appears. |
Description Image |
Description image for the expanded area. Not shown by default. When provided, appears on the right side of the expanded area. When omitted, the system uses the last image. See the descPic field in NotificationData for details. |
Left-right text template layout — specific parameters:
Left text block
Parameter
Description
First-line Text
First-line text. Maximum length is 128 characters. Cannot be empty.
Second-line Text
Second-line text. Maximum length is 128 characters. Cannot be empty.
Left text block
Parameter
Description
First-line Text
First-line text. Maximum length is 128 characters. Cannot be empty.
Second-line Text
Second-line text. Maximum length is 128 characters. Cannot be empty.
Separator Icon
Local resource. Appears in the center of the expanded area.
Event type-specific parameters:
Home team
Parameter
Description
Home Team Icon
Team icon shown in the display area. Required when the operation type is Create. Cannot be empty.
Value is the filename in the specified path.
Example: If the icon file “icon.png” is stored in your app’s “/resources/rawfile” path, the value is “icon.png”.
Home Team Name
Team name.
Home Team Score
Match score.
Away team
Parameter
Description
Away Team Icon
Team icon shown in the display area. Required when the operation type is Create. Cannot be empty.
Value is the filename in the specified path.
Example: If the icon file “icon.png” is stored in your app’s “/resources/rawfile” path, the value is “icon.png”.
Away Team Name
Team name.
Away Team Score
Match score.
Match info
Parameter
Description
Match Description
Description text above the center of the expanded area.
Match Time
Match time below the center of the expanded area.
4. Capsule Layout
Enable capsule layout using the toggle button in this section. Configure capsule notification layout data. For corresponding fields, see the CapsuleData struct.
Parameter |
Description |
Capsule Type |
Capsule layout types:
|
Capsule State |
Whether the capsule appears in the status bar for your Live View activity:
|
State Icon |
State icon. Local resource. We recommend a solid-color vector icon sized 18 × 18 vp. Example: If the icon file “icon.svg” is stored in your app’s “/resources/rawfile” path, the value is “icon.svg”. |
Animation Effect |
Animation effect for the capsule in the status bar. No special effect is applied if omitted.
|
Capsule Background Color |
Background color of the capsule. Format: "#ARGB" (9-character hexadecimal). The following colors are not allowed:
|
Capsule Title |
Main text for the capsule state. Maximum length is 128 characters. Required when the operation type is Create and the layout type is Icon + text. When the layout type is Icon + text, this field sets the capsule title. |
Capsule Content |
Maximum length is 128 characters. Shown as extended text on wide-screen or landscape devices. Required when the operation type is Create and the layout type is Icon + text or Timer. When the layout type is Icon + text or Timer, this field sets the capsule content. |
Capsule timer:
Parameter |
Description |
Timer Initial Value |
Initial value for the capsule timer. Refreshes every second. Unit: milliseconds. Default is 0. |
Countdown |
Whether the timer displays as a countdown.
|
Pause |
Whether the capsule timer is paused.
|
Capsule progress information:
Parameter |
Description |
Maximum Progress Value |
Maximum progress value. Range: 1 to 2147483647. |
Current Progress Value |
Current progress value. Range: 0 to 2147483647. Must be less than or equal to the maximum progress value. |
Infinite Loop |
Progress display type.
|
5. External Display
Enable external display layout using the toggle button in this section. Configure data for small external displays, such as those on Pocket series phone external screens. For corresponding fields, see the ExternalData struct.
Parameter |
Description |
External Display Template Type |
This includes the following:
|
External Display Background Color |
Format: "#RGB" (7-character hexadecimal). If not set, the system uses its default color. |
External Display Notification Title |
Custom title for the external display notification. Maximum length is 128 characters. Required when the operation type is Create. Cannot be empty. |
External Display Notification Content |
Custom content for the external display notification. Composed of multiple rich text (RichText) segments. Total length must not exceed 128 characters. If you set text color, use only one color. |
External Display Background Image |
Local resource. Required when the template type is Background image and creating the image for the first time. Optional for subsequent updates. Value is the filename in the specified path. |
Push Real-Time Activity
After you complete the configuration, click Push Notification to send the notification.