1e41f4b71Sopenharmony_ci# BaseContext
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci**BaseContext** is an abstract class that specifies whether a child class **Context** is used for the stage model or FA model. It is the parent class for all types of **Context**.
4e41f4b71Sopenharmony_ci
5e41f4b71Sopenharmony_ci> **NOTE**
6e41f4b71Sopenharmony_ci>
7e41f4b71Sopenharmony_ci> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
8e41f4b71Sopenharmony_ci
9e41f4b71Sopenharmony_ci## Modules to Import
10e41f4b71Sopenharmony_ci
11e41f4b71Sopenharmony_ci```ts
12e41f4b71Sopenharmony_ciimport { common } from '@kit.AbilityKit';
13e41f4b71Sopenharmony_ci```
14e41f4b71Sopenharmony_ci
15e41f4b71Sopenharmony_ci## Attributes
16e41f4b71Sopenharmony_ci
17e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 11.
18e41f4b71Sopenharmony_ci
19e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Ability.AbilityRuntime.Core
20e41f4b71Sopenharmony_ci
21e41f4b71Sopenharmony_ci| Name      | Type  | Readable  | Writable  | Description     |
22e41f4b71Sopenharmony_ci| -------- | ------ | ---- | ---- | ------- |
23e41f4b71Sopenharmony_ci| stageMode | boolean | Yes   | Yes   | Whether the child class **Context** is used for the stage model.<br>**true**: used for the stage model.<br>**false**: used for the FA model. |
24e41f4b71Sopenharmony_ci
25e41f4b71Sopenharmony_ci**Example**
26e41f4b71Sopenharmony_ci
27e41f4b71Sopenharmony_ciTake the stage model as an example. You can access the **stageMode** field through **UIAbilityContext**.
28e41f4b71Sopenharmony_ci
29e41f4b71Sopenharmony_ci```ts
30e41f4b71Sopenharmony_ciimport { UIAbility, AbilityConstant, Want } from '@kit.AbilityKit';
31e41f4b71Sopenharmony_ci
32e41f4b71Sopenharmony_ciclass EntryAbility extends UIAbility {
33e41f4b71Sopenharmony_ci  onCreate(want: Want, launchParam: AbilityConstant.LaunchParam) {
34e41f4b71Sopenharmony_ci    // EntryAbility onCreate, isStageMode: true
35e41f4b71Sopenharmony_ci    console.log(`EntryAbility onCreate, isStageMode: ${this.context.stageMode}`);
36e41f4b71Sopenharmony_ci  }
37e41f4b71Sopenharmony_ci}
38e41f4b71Sopenharmony_ci```
39