If you want to use your app to call Live View Kit to create live views locally and then use Push Kit to update or end the live views, configure the API parameters required by Live View Kit in your project by referring to the Live View Kit and Push Kit API parameter mapping table.
For ease of reading and description, the terms device side and cloud side are used uniformly throughout the table as abbreviations for the Live View Kit ArkTS API and Push Kit REST API, respectively.
| Live View Kit ArkTS API | Push Kit REST API | Difference |
|---|---|---|
liveViewManager.startLiveView liveViewManager.updateLiveView liveViewManager.stopLiveView liveViewManager.startLiveViewByTrigger liveViewManager.stopLiveViewByTrigger | liveViewPayload.operation | liveViewManager.startLiveView maps to an operation value of 0 on the cloud side. liveViewManager.updateLiveView maps to an operation value of 1 on the cloud side. liveViewManager.stopLiveView maps to an operation value of 2 on the cloud side. liveViewManager.startLiveViewByTrigger maps to an operation value of 4 on the cloud side. liveViewManager.stopLiveViewByTrigger maps to an operation value of 6 on the cloud side. |
| liveView | payload | N/A |
| liveView.id | payload.activityId | N/A |
| liveView.event | payload.event | For live view creation, the API on the cloud side supports only the FLIGHT, TAXI, TRAIN, DELIVERY, QUEUE, RENT, EXPRESS, CHECK_IN, TRADE, and SUBSCRIBE_TIMER scenarios. |
| liveView.subEvent | payload.subEvent | N/A |
| N/A | payload.status | APIs on the device side do not support the live view status parameter. |
| liveView.sequence | payload.version | N/A |
| liveView.isMute | payload.mute | N/A |
| liveView.lifeCycleMode | N/A | The API on the cloud side does not support the live view lifecycle mode parameter. |
| liveView.shareUrl | payload.shareUrl | N/A |
| liveView.timer | N/A | APIs on the cloud side do not support the live view widget timer parameter. |
| liveView.timer.time | N/A | N/A |
| liveView.timer.isCountdown | N/A | N/A |
| liveView.timer.isPaused | N/A | N/A |
| liveView.timer.countdownPreset | N/A | N/A |
| liveView.timer.capsuleCountdownPreset | N/A | N/A |
| liveView.timer.countdownPreset.presetTitle | N/A | N/A |
| liveView.timer.countdownPreset.presetContent | N/A | N/A |
| liveView.liveViewData | payload.activityData | N/A |
| liveView.liveViewData.primary | payload.activityData.notificationData | N/A |
| N/A | payload.activityData.notificationData.keywords | The device side does not support the live view keyword parameter. |
| liveView.liveViewData.primary.title | payload.activityData.notificationData.contentTitle | N/A |
| liveView.liveViewData.primary.content | payload.activityData.notificationData.contentText | N/A |
| liveView.liveViewData.primary.keepTime | payload.activityData.notificationData.keepTime | N/A |
| liveView.liveViewData.primary.clickAction | payload.activityData.notificationData.clickAction | N/A |
| liveView.liveViewData.primary.liveViewLockScreenPicture | payload.activityData.notificationData.lockScreen.picture | N/A |
| liveView.liveViewData.primary.liveViewLockScreenAbilityName | payload.activityData.notificationData.lockScreen.abilityName | N/A |
| liveView.liveViewData.primary.liveViewLockScreenAbilityParameters | N/A | The cloud side does not support the parameters for the lock screen immersive live view extension ability. |
| liveView.liveViewData.primary.backgroundType | payload.activityData.notificationData.backgroundType | The enum value SYS_BACKGROUND_UNDEFINED in backgroundType on the device side maps to a backgroundType value of 0 on the cloud side. The enum value SYS_BACKGROUND_FLIGHT_MOON in backgroundType on the device side maps to a backgroundType value of 100 on the cloud side. The enum value SYS_BACKGROUND_FLIGHT_SUNSET in backgroundType on the device side maps to a backgroundType value of 101 on the cloud side. |
| liveView.liveViewData.primary.aliveTime | N/A | The cloud side does not support the live view alive time parameter. |
| liveView.liveViewData.primary.extensionData | payload.activityData.notificationData.extend | N/A |
| liveView.liveViewData.primary.extensionData.type | payload.activityData.notificationData.extend.type | The enum value EXTENSION_TYPE_DEFAULT in type on the device side maps to a type value of 0 on the cloud side. The enum value EXTENSION_TYPE_COMMON_TEXT in type on the device side maps to a type value of 1 on the cloud side. The enum value EXTENSION_TYPE_CAPSULE_TEXT in type on the device side maps to a type value of 2 on the cloud side. The enum value EXTENSION_TYPE_PIC in type on the device side maps to a type value of 3 on the cloud side. The enum value EXTENSION_TYPE_ICON in type on the device side maps to a type value of 4 on the cloud side. The enum value EXTENSION_TYPE_PROGRESS in type on the device side is not supported by the API on the cloud side. |
| liveView.liveViewData.primary.extensionData.text | payload.activityData.notificationData.extend.text | N/A |
| liveView.liveViewData.primary.extensionData.pic | payload.activityData.notificationData.extend.image | Only image paths can be passed on the cloud side. |
| N/A | payload.activityData.notificationData.extend.imageUrl | The device side does not support the auxiliary area image URL parameter. Note: To display a network image in the live view auxiliary area on the device side, the app can download the network image, convert it into a PixelMap object, and pass it to the extensionData.pic parameter. |
| liveView.liveViewData.primary.extensionData.clickAction | payload.activityData.notificationData.extend.clickAction | N/A |
| liveView.liveViewData.primary.extensionData.progress | N/A | The API on the cloud side does not support the progress percentage. |
| liveView.liveViewData.primary.layoutData | N/A | The cloud side does not support the live view widget extension area structure parameter. Related API parameters are included in the notificationData structure. |
| liveView.liveViewData.primary.layoutData.layoutType | payload.activityData.notificationData.type | The enum value LAYOUT_TYPE_DEFAULT in layoutType on the device side maps to a type value of -1 on the cloud side. The enum value LAYOUT_TYPE_PROGRESS in layoutType on the device side maps to a type value of 3 on the cloud side. The enum value LAYOUT_TYPE_PICKUP in layoutType on the device side maps to a type value of 4 on the cloud side. The enum value LAYOUT_TYPE_FLIGHT in layoutType on the device side maps to a type value of 5 on the cloud side. The enum value LAYOUT_TYPE_SCORE in layoutType on the device side maps to a type value of 7 on the cloud side. The enum value LAYOUT_TYPE_NAVIGATION in layoutType on the device side is not supported by the API on the cloud side. The enum value LAYOUT_TYPE_CUSTOM in layoutType on the device side maps to a type value of 100 on the cloud side. |
| liveView.liveViewData.primary.layoutData.serviceButtons | N/A | The cloud side does not support the associated service button parameter. |
| liveView.liveViewData.primary.layoutData.isServiceButtonsDisplayed | N/A | The cloud side does not support the parameter indicating whether to display the associated service button. |
| liveView.liveViewData.primary.layoutData.serviceButton.name | N/A | N/A |
| liveView.liveViewData.primary.layoutData.serviceButton.clickAction | N/A | N/A |
| liveView.liveViewData.primary.layoutData.weatherInfo | payload.activityData.notificationData.weather | N/A |
| liveView.liveViewData.primary.layoutData.weatherInfo.weatherType | payload.activityData.notificationData.weather.weatherType | The parameter value passed on the device side is a WeatherType enum value, while the parameter value passed on the cloud side is a WeatherType enum value. |
| liveView.liveViewData.primary.layoutData.weatherInfo.locationType | payload.activityData.notificationData.weather.locationType | The parameter value passed on the device side is a WeatherLocationType enum value, while the parameter value passed on the cloud side is a WeatherLocationType enum value. |
| liveView.liveViewData.primary.layoutData.weatherInfo.highTemperature | payload.activityData.notificationData.weather.highTemperature | N/A |
| liveView.liveViewData.primary.layoutData.weatherInfo.lowTemperature | payload.activityData.notificationData.weather.lowTemperature | N/A |
| liveView.liveViewData.primary.progressLayout.progress | payload.activityData.notificationData.richProgress.progress | N/A |
| liveView.liveViewData.primary.progressLayout.color | payload.activityData.notificationData.richProgress.color | N/A |
| liveView.liveViewData.primary.progressLayout.backgroundColor | payload.activityData.notificationData.richProgress.bgColor | N/A |
| liveView.liveViewData.primary.progressLayout.indicatorType | payload.activityData.notificationData.richProgress.indicatorType | N/A |
| liveView.liveViewData.primary.progressLayout.indicatorIcon | payload.activityData.notificationData.richProgress.indicatorIcon | N/A |
| liveView.liveViewData.primary.progressLayout.lineType | payload.activityData.notificationData.richProgress.type | N/A |
| liveView.liveViewData.primary.progressLayout.nodeIcons | payload.activityData.notificationData.richProgress.nodeIcons | N/A |
| liveView.liveViewData.primary.pickupLayout.title | payload.activityData.notificationData.singleTextBlock.firstLine | N/A |
| liveView.liveViewData.primary.pickupLayout.content | payload.activityData.notificationData.singleTextBlock.secondLine | N/A |
| liveView.liveViewData.primary.pickupLayout.underlineColor | payload.activityData.notificationData.singleTextBlock.underlineColor | N/A |
| liveView.liveViewData.primary.pickupLayout.descPic | payload.activityData.notificationData.descPic | N/A |
| N/A | payload.activityData.notificationData.descPicUrl | The device side does not support the parameter indicating the description image URL for the extension area of the emphasized text template. Note: To display a network image as the description image in the live view extension area on the device side, the app can download the network image, convert it into a PixelMap object, and pass it to the pickupLayout.descPic parameter. |
| liveView.liveViewData.primary.flightLayout.style | payload.activityData.notificationData.style | N/A |
| liveView.liveViewData.primary.flightLayout.firstTitle | payload.activityData.notificationData.firstTextBlock.firstLine | N/A |
| liveView.liveViewData.primary.flightLayout.firstContent | payload.activityData.notificationData.firstTextBlock.secondLine | N/A |
| liveView.liveViewData.primary.flightLayout.lastTitle | payload.activityData.notificationData.lastTextBlock.firstLine | N/A |
| liveView.liveViewData.primary.flightLayout.lastContent | payload.activityData.notificationData.lastTextBlock.secondLine | N/A |
| liveView.liveViewData.primary.flightLayout.lastTitleSuperscript | payload.activityData.notificationData.lastTextBlock.firstLineSuperscript | N/A |
| liveView.liveViewData.primary.flightLayout.lastContentSuperscript | payload.activityData.notificationData.lastTextBlock.secondLineSuperscript | N/A |
| liveView.liveViewData.primary.flightLayout.spaceType | payload.activityData.notificationData.spaceType | N/A |
| liveView.liveViewData.primary.flightLayout.spaceIcon | payload.activityData.notificationData.spaceIcon | N/A |
| N/A | payload.activityData.notificationData.spaceIconUrl | The device side does not support the parameter indicating the spacing icon URL for the left-right text template. Note: To display a network image as the spacing icon in the live view left-right text template on the device side, the app can download the network image, convert it into a PixelMap object, and pass it to the flightLayout.spaceIcon parameter. |
| liveView.liveViewData.primary.flightLayout.spaceText | payload.activityData.notificationData.spaceText | N/A |
| liveView.liveViewData.primary.flightLayout.isHorizontalLineDisplayed | payload.activityData.notificationData.displayHorizontalLine | N/A |
| liveView.liveViewData.primary.flightLayout.additionalText | payload.activityData.notificationData.additionalText | N/A |
| liveView.liveViewData.primary.scoreLayout.hostName | payload.activityData.notificationData.game.host.name | N/A |
| liveView.liveViewData.primary.scoreLayout.hostIcon | payload.activityData.notificationData.game.host.icon | N/A |
| N/A | payload.activityData.notificationData.game.host.iconUrl | The device side does not support the parameter indicating the team icon URL for the display area in the live scores template. Note: To display a network image as the team icon in the home team display area of the live scores template on the device side, the app can download the network image, convert it into a PixelMap object, and pass it to the scoreLayout.hostIcon parameter. |
| liveView.liveViewData.primary.scoreLayout.hostScore | payload.activityData.notificationData.game.host.score | N/A |
| liveView.liveViewData.primary.scoreLayout.guestName | payload.activityData.notificationData.game.guest.name | N/A |
| liveView.liveViewData.primary.scoreLayout.guestIcon | payload.activityData.notificationData.game.guest.icon | N/A |
| N/A | payload.activityData.notificationData.game.guest.iconUrl | The device side does not support the parameter indicating the team icon URL for the display area in the live scores template. Note: To display a network image as the team icon in the away team display area of the live scores template on the device side, the app can download the network image, convert it into a PixelMap object, and pass it to the scoreLayout.guestIcon parameter. |
| liveView.liveViewData.primary.scoreLayout.guestScore | payload.activityData.notificationData.game.guest.score | N/A |
| liveView.liveViewData.primary.scoreLayout.competitionDesc | payload.activityData.notificationData.game.competition.desc|richDesc | N/A |
| liveView.liveViewData.primary.scoreLayout.competitionTime | payload.activityData.notificationData.game.competition.time | N/A |
| liveView.liveViewData.primary.scoreLayout.isHorizontalLineDisplayed | payload.activityData.notificationData.displayHorizontalLine | N/A |
| liveView.liveViewData.primary.navigationLayout.currentNavigationIcon | N/A | The cloud side does not support the live view navigation template. |
| liveView.liveViewData.primary.navigationLayout.navigationIcons | N/A | N/A |
| liveView.liveViewData.primary.navigationLayout.isNavigationIconsDisplayed | N/A | N/A |
| liveView.liveViewData.primary.customLayout.abilityName | payload.activityData.notificationData.customLayout.abilityName | N/A |
| liveView.liveViewData.primary.customLayout.abilityParameters | payload.activityData.notificationData.customLayout.abilityParameters | N/A |
| liveView.liveViewData.capsule | payload.activityData.capsuleData | N/A |
| liveView.liveViewData.capsule.type | payload.activityData.capsuleData.type | The enum value CAPSULE_TYPE_TEXT in type on the device side maps to a type value of 1 on the cloud side. The enum value CAPSULE_TYPE_TIMER in type on the device side maps to a type value of 2 on the cloud side. The enum value CAPSULE_TYPE_PROGRESS in type on the device side maps to a type value of 3 on the cloud side. |
| liveView.liveViewData.capsule.status | payload.activityData.capsuleData.status | N/A |
| liveView.liveViewData.capsule.icon | payload.activityData.capsuleData.icon | N/A |
| N/A | payload.activityData.capsuleData.iconUrl | The device side does not support the live view capsule icon URL parameter. Note: To display a network image as the live view capsule icon on the device side, the app can download the network image, convert it into a PixelMap object, and pass it to the capsule.icon parameter. |
| liveView.liveViewData.capsule.tailIcon | payload.activityData.capsuleData.tailIcon | N/A |
| N/A | payload.activityData.capsuleData.tailIconUrl | The device side does not support the live view capsule tail icon URL parameter. Note: To display a network image as the live view capsule icon on the device side, the app can download the network image, convert it into a PixelMap object, and pass it to the capsule.tailIcon parameter. |
| liveView.liveViewData.capsule.backgroundColor | payload.activityData.capsuleData.bgColor | N/A |
| N/A | payload.activityData.capsuleData.remind | The device side does not support the parameter indicating the live view capsule dynamic effect in the status bar. |
| liveView.liveViewData.capsule.isContentDisplayed | payload.activityData.capsuleData.isContentDisplayed | N/A |
| liveView.liveViewData.capsule.isTailIconDisplayed | payload.activityData.capsuleData.isTailIconDisplayed | N/A |
| liveView.liveViewData.textCapsule.title | payload.activityData.capsuleData.title | N/A |
| liveView.liveViewData.textCapsule.content | payload.activityData.capsuleData.content | N/A |
| liveView.liveViewData.timerCapsule.content | payload.activityData.capsuleData.content | N/A |
| liveView.liveViewData.timerCapsule.time | payload.activityData.capsuleData.capsuleTimer.time | N/A |
| liveView.liveViewData.timerCapsule.isCountdown | payload.activityData.capsuleData.capsuleTimer.countDown | N/A |
| liveView.liveViewData.timerCapsule.isPause | payload.activityData.capsuleData.capsuleTimer.pause | N/A |
| liveView.liveViewData.progressCapsule.max | payload.activityData.capsuleData.progress.max | N/A |
| liveView.liveViewData.progressCapsule.progress | payload.activityData.capsuleData.progress.progress | N/A |
| liveView.liveViewData.progressCapsule.indeterminate | payload.activityData.capsuleData.progress.indeterminate | N/A |
| liveView.liveViewData.progressCapsule.content | payload.activityData.capsuleData.content | N/A |
| liveView.liveViewData.external | payload.activityData.externalData | N/A |
| liveView.liveViewData.externalData.title | payload.activityData.externalData.title | N/A |
| liveView.liveViewData.externalData.content | payload.activityData.externalData.body | N/A |
| liveView.liveViewData.externalData.type | payload.activityData.externalData.type | The enum value BACKGROUND_COLOR in type on the device side maps to a type value of 0 on the cloud side. The enum value BACKGROUND_PICTURE in type on the device side maps to a type value of 1 on the cloud side. |
| liveView.liveViewData.externalData.backgroundColor | payload.activityData.externalData.bgColor | N/A |
| liveView.liveViewData.externalData.backgroundPicture | payload.activityData.externalData.bgImage | N/A |
| trigger | payload.trigger | N/A |
| trigger.type | payload.trigger.type | N/A |
| trigger.condition | payload.trigger.condition | N/A |
| trigger.displayTime | payload.trigger.displayTime | N/A |
| trigger.condition.longitude | payload.trigger.condition.longitude | N/A |
| trigger.condition.latitude | payload.trigger.condition.latitude | N/A |
| trigger.condition.coordinateSystemType | payload.trigger.condition.coordinateSystemType | N/A |
| trigger.condition.radius | payload.trigger.condition.radius | N/A |
| trigger.condition.monitorEvent | payload.trigger.condition.monitorEvent | N/A |
| trigger.condition.delayTime | payload.trigger.condition.delayTime | N/A |
| RichText.text | RichText.text | N/A |
| RichText.textColor | RichText.foregroundColor | N/A |