目录

Updating Widget Content Through the router or call Event

With the router event, a touch on the widget can start the associated application's UIAbility in the foreground and trigger a widget update. With the call event, a touch on the widget can start the associated application's UIAbility in the background and trigger a widget update. On the widget page, the postCardAction API can be used to trigger a router or call event to start a UIAbility, which then updates the widget content. The following is an example of this widget update mode.

This topic describes development for dynamic widgets. For static widgets, see FormLink.

Updating Widget Content Through the router Event

Updating Widget Content Through the call Event