目录

What are the relationships between UIContext, Ability, and UIAbilityContext?

  1. The context of an ability is AbilityContext. The context of an ArkUI instance is UIContext. The window creates and manages all UI objects. You can use windowStage.loadContent to start an ArkUI instance.
  2. An ability is an object that manages the lifecycle of an application and holds the window object.
  3. The context of UIAbility is UIAbilityContext. UIContext and UIAbilityContext are not directly related and cannot be converted to each other.