From 39cfb78c4480971f0ca7f4bc30e80c53a9376ea2 Mon Sep 17 00:00:00 2001 From: liyan Date: Thu, 2 Feb 2023 07:49:06 +0000 Subject: [PATCH] update en/application-dev/application-models/application-context-stage.md. Signed-off-by: li-yan339 Signed-off-by: liyan --- .../application-models/application-context-stage.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/en/application-dev/application-models/application-context-stage.md b/en/application-dev/application-models/application-context-stage.md index 8d49b7369b..80c401858a 100644 --- a/en/application-dev/application-models/application-context-stage.md +++ b/en/application-dev/application-models/application-context-stage.md @@ -6,10 +6,12 @@ [Context](../reference/apis/js-apis-inner-application-context.md) is the context of an object in an application. It provides basic information about the application, for example, **resourceManager**, **applicationInfo**, **dir** (application development path), and **area** (encrypted area). It also provides basic methods such as **createBundleContext()** and **getApplicationContext()**. The UIAbility component and ExtensionAbility derived class components have their own **Context** classes, for example, the base class **Context**, **ApplicationContext**, **AbilityStageContext**, **UIAbilityContext**, **ExtensionContext**, and **ServiceExtensionContext**. - The figure below illustrates the inheritance relationship of contexts. - context-inheritance + + ![context-inheritance](figures/context-inheritance.png) - The figure below illustrates the holding relationship of contexts. - context-holding + + ![context-holding](figures/context-holding.png) - The following describes the information provided by different contexts. - [UIAbilityContext](../reference/apis/js-apis-inner-application-uiAbilityContext.md): Each UIAbility has the **Context** attribute, which provides APIs to operate the ability, obtain the ability configuration, and more. @@ -89,7 +91,8 @@ The following table describes the application development paths obtained from co The capability of obtaining the application development path is provided by the base class **Context**. This capability is also provided by **ApplicationContext**, **AbilityStageContext**, **UIAbilityContext**, and **ExtensionContext**. However, the paths obtained from different contexts may differ, as shown below. **Figure 1** Application development paths obtained from context -context-dir + +![context-dir](figures/context-dir.png) - Obtain the application-level path through **ApplicationContext**. It is recommended that global application information be stored in this path. Files stored in this path will be deleted only when the application is uninstalled. | Name| Path| -- GitLab