harmony 鸿蒙Widget Event Capability Overview

  • 2025-06-12
  • 浏览 (6)

Widget Event Capability Overview

For dynamic ArkTS widgets, the postCardAction API is provided for interaction between the widget internal and the provider application. Currently, this API supports the router, message, and call events and can be called only in the widget.

For static ArkTS widgets, the FormLink component is provided for interaction between the widget internal and the provider application.

Dynamic Widget Event Capability

WidgetPostCardAction

Dynamic widget events are used in the following scenarios: - Router event: used to redirect to a UIAbility and update the widget content. - Call event: used to start a UIAbility in the background and update the widget content. - Message event: used to start a FormExtensionAbility, which then updates the widget content.

Static Widget Event Capability

See FormLink.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Form Kit

harmony 鸿蒙Configuring Widget Configuration Files

harmony 鸿蒙Updating Widget Content by Widget Host (for System Applications Only)

harmony 鸿蒙Creating an ArkTS Widget

harmony 鸿蒙Launching the UIAbility of the Widget Provider in the Background Through the call Event

harmony 鸿蒙Overview of ArkTs Widget Page Editing Interaction

harmony 鸿蒙Editing and Updating the Widget Content

harmony 鸿蒙Updating Widget Content Through the message Event

harmony 鸿蒙Launching the UIAbility of the Widget Provider Through the router Event

harmony 鸿蒙Updating Widget Content Through the router or call Event

0  赞