harmony 鸿蒙AbilityResult
AbilityResult
The AbilityResult module defines the result code and data returned when an ability is terminated after being started.
In the stage model, you can use startAbilityForResult to obtain the AbilityResult object returned after the started ability is terminated by calling terminateSelfWithResult.
In the FA model, you can use startAbilityForResult to obtain the AbilityResult object returned after the started ability is terminated by calling terminateSelfWithResult.
NOTE
The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
Modules to Import
Stage model:
import { common } from '@kit.AbilityKit';
FA model:
import ability from '@ohos.ability.ability';
Attributes
Atomic service API: This API can be used in atomic services since API version 11.
System capability: SystemCapability.Ability.AbilityBase
Name | Type | Read-only | Optional | Description |
---|---|---|---|---|
resultCode | number | No | No | Result code returned by the target party to the caller after the ability of the target party is started and then terminated. - In normal cases, the result code sent by the target party is returned. - In abnormal cases, the value -1 is returned. |
want | Want | No | Yes | Data returned after the started ability is terminated. |
你可能感兴趣的鸿蒙文章
harmony 鸿蒙AbilityAccessControl
harmony 鸿蒙OH_NativeBundle_ApplicationInfo
harmony 鸿蒙OH_NativeBundle_ElementName
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦