未验证 提交 32ba6c79 编写于 作者: O openharmony_ci 提交者: Gitee

!24044 【资料问题】元能力文档接口一致性问题修改

Merge pull request !24044 from yuyaozhi/master
...@@ -24,15 +24,17 @@ AbilityResult:SystemCapability.Ability.AbilityBase ...@@ -24,15 +24,17 @@ AbilityResult:SystemCapability.Ability.AbilityBase
ConnectOptions:SystemCapability.Ability.AbilityRuntime.Core ConnectOptions:SystemCapability.Ability.AbilityRuntime.Core
StartAbilityParameter:SystemCapability.Ability.AbilityRuntime.FAModel StartAbilityParameter:SystemCapability.Ability.AbilityRuntime.FAModel
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core
| 名称 | 类型 | 描述 | | 名称 | 类型 | 描述 |
| ----------- | -------------------- | ------------------------------------------------------------ | | ----------- | -------------------- | ------------------------------------------------------------ |
| DataAbilityHelper | [DataAbilityHelper](js-apis-inner-ability-dataAbilityHelper.md) | DataAbilityHelper二级模块。 | | DataAbilityHelper | [DataAbilityHelper](js-apis-inner-ability-dataAbilityHelper.md) | DataAbilityHelper二级模块。<br/>SystemCapability.Ability.AbilityRuntime.FAModel |
| PacMap | [PacMap](js-apis-inner-ability-dataAbilityHelper.md#pacmap) | PacMap二级模块。 | | PacMap | [PacMap](js-apis-inner-ability-dataAbilityHelper.md#pacmap) | PacMap二级模块。<br/>SystemCapability.Ability.AbilityRuntime.FAModel |
| DataAbilityOperation | [DataAbilityOperation](js-apis-inner-ability-dataAbilityOperation.md) | DataAbilityOperation二级模块。 | | DataAbilityOperation | [DataAbilityOperation](js-apis-inner-ability-dataAbilityOperation.md) | DataAbilityOperation二级模块。<br/>SystemCapability.Ability.AbilityRuntime.FAModel |
| DataAbilityResult | [DataAbilityResult](js-apis-inner-ability-dataAbilityResult.md) | DataAbilityResult二级模块。 | | DataAbilityResult | [DataAbilityResult](js-apis-inner-ability-dataAbilityResult.md) | DataAbilityResult二级模块。<br/>SystemCapability.Ability.AbilityRuntime.FAModel |
| AbilityResult | [AbilityResult](js-apis-inner-ability-abilityResult.md) | AbilityResult二级模块。 | | AbilityResult | [AbilityResult](js-apis-inner-ability-abilityResult.md) | AbilityResult二级模块。<br/>SystemCapability.Ability.AbilityBase |
| ConnectOptions | [ConnectOptions](js-apis-inner-ability-connectOptions.md) | ConnectOptions二级模块。 | | ConnectOptions | [ConnectOptions](js-apis-inner-ability-connectOptions.md) | ConnectOptions二级模块。<br/>SystemCapability.Ability.AbilityRuntime.Core |
| StartAbilityParameter | [StartAbilityParameter](js-apis-inner-ability-startAbilityParameter.md) | StartAbilityParameter二级模块。 | | StartAbilityParameter | [StartAbilityParameter](js-apis-inner-ability-startAbilityParameter.md) | StartAbilityParameter二级模块。<br/>ystemCapability.Ability.AbilityRuntime.FAModel |
**示例:** **示例:**
```ts ```ts
......
...@@ -16,8 +16,6 @@ import common from '@ohos.app.ability.common'; ...@@ -16,8 +16,6 @@ import common from '@ohos.app.ability.common';
**系统能力**:以下各项对应的系统能力均为SystemCapability.Ability.AbilityRuntime.Core **系统能力**:以下各项对应的系统能力均为SystemCapability.Ability.AbilityRuntime.Core
**系统API**:该接口为系统接口,三方应用不支持调用。
| 名称 | 类型 | 说明 | | 名称 | 类型 | 说明 |
| ----------- | -------------------- | ------------------------------------------------------------ | | ----------- | -------------------- | ------------------------------------------------------------ |
| UIAbilityContext | [UIAbilityContext](js-apis-inner-application-uiAbilityContext.md) | UIAbilityContext二级模块。 | | UIAbilityContext | [UIAbilityContext](js-apis-inner-application-uiAbilityContext.md) | UIAbilityContext二级模块。 |
......
...@@ -11,7 +11,6 @@ formHost模块提供了卡片使用方相关接口的能力,包括对使用方 ...@@ -11,7 +11,6 @@ formHost模块提供了卡片使用方相关接口的能力,包括对使用方
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
``` ```
## deleteForm ## deleteForm
...@@ -50,6 +49,7 @@ deleteForm(formId: string, callback: AsyncCallback&lt;void&gt;): void ...@@ -50,6 +49,7 @@ deleteForm(formId: string, callback: AsyncCallback&lt;void&gt;): void
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
try { try {
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
...@@ -107,6 +107,7 @@ deleteForm(formId: string): Promise&lt;void&gt; ...@@ -107,6 +107,7 @@ deleteForm(formId: string): Promise&lt;void&gt;
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
try { try {
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
...@@ -156,6 +157,7 @@ releaseForm(formId: string, callback: AsyncCallback&lt;void&gt;): void ...@@ -156,6 +157,7 @@ releaseForm(formId: string, callback: AsyncCallback&lt;void&gt;): void
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
try { try {
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
...@@ -206,6 +208,7 @@ releaseForm(formId: string, isReleaseCache: boolean, callback: AsyncCallback&lt; ...@@ -206,6 +208,7 @@ releaseForm(formId: string, isReleaseCache: boolean, callback: AsyncCallback&lt;
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
try { try {
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
...@@ -261,6 +264,7 @@ releaseForm(formId: string, isReleaseCache?: boolean): Promise&lt;void&gt; ...@@ -261,6 +264,7 @@ releaseForm(formId: string, isReleaseCache?: boolean): Promise&lt;void&gt;
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
try { try {
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
...@@ -310,6 +314,7 @@ requestForm(formId: string, callback: AsyncCallback&lt;void&gt;): void ...@@ -310,6 +314,7 @@ requestForm(formId: string, callback: AsyncCallback&lt;void&gt;): void
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
try { try {
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
...@@ -364,6 +369,7 @@ requestForm(formId: string): Promise&lt;void&gt; ...@@ -364,6 +369,7 @@ requestForm(formId: string): Promise&lt;void&gt;
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
try { try {
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
...@@ -414,6 +420,7 @@ castToNormalForm(formId: string, callback: AsyncCallback&lt;void&gt;): void ...@@ -414,6 +420,7 @@ castToNormalForm(formId: string, callback: AsyncCallback&lt;void&gt;): void
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
try { try {
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
...@@ -468,6 +475,7 @@ castToNormalForm(formId: string): Promise&lt;void&gt; ...@@ -468,6 +475,7 @@ castToNormalForm(formId: string): Promise&lt;void&gt;
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
try { try {
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
...@@ -515,6 +523,7 @@ notifyVisibleForms(formIds: Array&lt;string&gt;, callback: AsyncCallback&lt;void ...@@ -515,6 +523,7 @@ notifyVisibleForms(formIds: Array&lt;string&gt;, callback: AsyncCallback&lt;void
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
try { try {
let formId: string[] = ['12400633174999288']; let formId: string[] = ['12400633174999288'];
...@@ -567,6 +576,7 @@ notifyVisibleForms(formIds: Array&lt;string&gt;): Promise&lt;void&gt; ...@@ -567,6 +576,7 @@ notifyVisibleForms(formIds: Array&lt;string&gt;): Promise&lt;void&gt;
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
try { try {
let formId: string[] = ['12400633174999288']; let formId: string[] = ['12400633174999288'];
...@@ -614,6 +624,7 @@ notifyInvisibleForms(formIds: Array&lt;string&gt;, callback: AsyncCallback&lt;vo ...@@ -614,6 +624,7 @@ notifyInvisibleForms(formIds: Array&lt;string&gt;, callback: AsyncCallback&lt;vo
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
try { try {
let formId: string[] = ['12400633174999288']; let formId: string[] = ['12400633174999288'];
...@@ -666,6 +677,7 @@ notifyInvisibleForms(formIds: Array&lt;string&gt;): Promise&lt;void&gt; ...@@ -666,6 +677,7 @@ notifyInvisibleForms(formIds: Array&lt;string&gt;): Promise&lt;void&gt;
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
try { try {
let formId: string[] = ['12400633174999288']; let formId: string[] = ['12400633174999288'];
...@@ -714,6 +726,7 @@ enableFormsUpdate(formIds: Array&lt;string&gt;, callback: AsyncCallback&lt;void& ...@@ -714,6 +726,7 @@ enableFormsUpdate(formIds: Array&lt;string&gt;, callback: AsyncCallback&lt;void&
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
try { try {
let formId: string[] = ['12400633174999288']; let formId: string[] = ['12400633174999288'];
...@@ -767,6 +780,7 @@ enableFormsUpdate(formIds: Array&lt;string&gt;): Promise&lt;void&gt; ...@@ -767,6 +780,7 @@ enableFormsUpdate(formIds: Array&lt;string&gt;): Promise&lt;void&gt;
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
try { try {
let formId: string[] = ['12400633174999288']; let formId: string[] = ['12400633174999288'];
...@@ -816,6 +830,7 @@ disableFormsUpdate(formIds: Array&lt;string&gt;, callback: AsyncCallback&lt;void ...@@ -816,6 +830,7 @@ disableFormsUpdate(formIds: Array&lt;string&gt;, callback: AsyncCallback&lt;void
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
try { try {
let formId: string[] = ['12400633174999288']; let formId: string[] = ['12400633174999288'];
...@@ -870,6 +885,7 @@ disableFormsUpdate(formIds: Array&lt;string&gt;): Promise&lt;void&gt; ...@@ -870,6 +885,7 @@ disableFormsUpdate(formIds: Array&lt;string&gt;): Promise&lt;void&gt;
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
try { try {
let formId: string[] = ['12400633174999288']; let formId: string[] = ['12400633174999288'];
...@@ -910,6 +926,7 @@ isSystemReady(callback: AsyncCallback&lt;void&gt;): void ...@@ -910,6 +926,7 @@ isSystemReady(callback: AsyncCallback&lt;void&gt;): void
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
try { try {
formHost.isSystemReady((error: Base.BusinessError) => { formHost.isSystemReady((error: Base.BusinessError) => {
...@@ -948,6 +965,7 @@ isSystemReady(): Promise&lt;void&gt; ...@@ -948,6 +965,7 @@ isSystemReady(): Promise&lt;void&gt;
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
try { try {
formHost.isSystemReady().then(() => { formHost.isSystemReady().then(() => {
...@@ -994,6 +1012,7 @@ getAllFormsInfo(callback: AsyncCallback&lt;Array&lt;formInfo.FormInfo&gt;&gt;): ...@@ -994,6 +1012,7 @@ getAllFormsInfo(callback: AsyncCallback&lt;Array&lt;formInfo.FormInfo&gt;&gt;):
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import formInfo from '@ohos.app.form.formInfo'; import formInfo from '@ohos.app.form.formInfo';
import Base from '@ohos.base';
try { try {
formHost.getAllFormsInfo((error: Base.BusinessError, data: formInfo.FormInfo[]) => { formHost.getAllFormsInfo((error: Base.BusinessError, data: formInfo.FormInfo[]) => {
...@@ -1041,6 +1060,7 @@ getAllFormsInfo(): Promise&lt;Array&lt;formInfo.FormInfo&gt;&gt; ...@@ -1041,6 +1060,7 @@ getAllFormsInfo(): Promise&lt;Array&lt;formInfo.FormInfo&gt;&gt;
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import formInfo from '@ohos.app.form.formInfo'; import formInfo from '@ohos.app.form.formInfo';
import Base from '@ohos.base';
try { try {
formHost.getAllFormsInfo().then((data: formInfo.FormInfo[]) => { formHost.getAllFormsInfo().then((data: formInfo.FormInfo[]) => {
...@@ -1089,6 +1109,7 @@ getFormsInfo(bundleName: string, callback: AsyncCallback&lt;Array&lt;formInfo.Fo ...@@ -1089,6 +1109,7 @@ getFormsInfo(bundleName: string, callback: AsyncCallback&lt;Array&lt;formInfo.Fo
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import formInfo from '@ohos.app.form.formInfo'; import formInfo from '@ohos.app.form.formInfo';
import Base from '@ohos.base';
try { try {
formHost.getFormsInfo('com.example.ohos.formjsdemo', (error: Base.BusinessError, data: formInfo.FormInfo[]) => { formHost.getFormsInfo('com.example.ohos.formjsdemo', (error: Base.BusinessError, data: formInfo.FormInfo[]) => {
...@@ -1140,6 +1161,7 @@ getFormsInfo(bundleName: string, moduleName: string, callback: AsyncCallback&lt; ...@@ -1140,6 +1161,7 @@ getFormsInfo(bundleName: string, moduleName: string, callback: AsyncCallback&lt;
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import formInfo from '@ohos.app.form.formInfo'; import formInfo from '@ohos.app.form.formInfo';
import Base from '@ohos.base';
try { try {
formHost.getFormsInfo('com.example.ohos.formjsdemo', 'entry', (error: Base.BusinessError, data: formInfo.FormInfo[]) => { formHost.getFormsInfo('com.example.ohos.formjsdemo', 'entry', (error: Base.BusinessError, data: formInfo.FormInfo[]) => {
...@@ -1196,6 +1218,7 @@ getFormsInfo(bundleName: string, moduleName?: string): Promise&lt;Array&lt;formI ...@@ -1196,6 +1218,7 @@ getFormsInfo(bundleName: string, moduleName?: string): Promise&lt;Array&lt;formI
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import formInfo from '@ohos.app.form.formInfo'; import formInfo from '@ohos.app.form.formInfo';
import Base from '@ohos.base';
try { try {
formHost.getFormsInfo('com.example.ohos.formjsdemo', 'entry').then((data: formInfo.FormInfo[]) => { formHost.getFormsInfo('com.example.ohos.formjsdemo', 'entry').then((data: formInfo.FormInfo[]) => {
...@@ -1242,6 +1265,7 @@ deleteInvalidForms(formIds: Array&lt;string&gt;, callback: AsyncCallback&lt;numb ...@@ -1242,6 +1265,7 @@ deleteInvalidForms(formIds: Array&lt;string&gt;, callback: AsyncCallback&lt;numb
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
try { try {
let formIds: string[] = new Array('12400633174999288', '12400633174999289'); let formIds: string[] = new Array('12400633174999288', '12400633174999289');
...@@ -1296,6 +1320,7 @@ deleteInvalidForms(formIds: Array&lt;string&gt;): Promise&lt;number&gt; ...@@ -1296,6 +1320,7 @@ deleteInvalidForms(formIds: Array&lt;string&gt;): Promise&lt;number&gt;
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
try { try {
let formIds: string[] = new Array('12400633174999288', '12400633174999289'); let formIds: string[] = new Array('12400633174999288', '12400633174999289');
...@@ -1346,6 +1371,7 @@ acquireFormState(want: Want, callback: AsyncCallback&lt;formInfo.FormStateInfo&g ...@@ -1346,6 +1371,7 @@ acquireFormState(want: Want, callback: AsyncCallback&lt;formInfo.FormStateInfo&g
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Want from '@ohos.app.ability.Want'; import Want from '@ohos.app.ability.Want';
import formInfo from '@ohos.app.form.formInfo'; import formInfo from '@ohos.app.form.formInfo';
import Base from '@ohos.base';
let want: Want = { let want: Want = {
'deviceId': '', 'deviceId': '',
...@@ -1412,6 +1438,7 @@ acquireFormState(want: Want): Promise&lt;formInfo.FormStateInfo&gt; ...@@ -1412,6 +1438,7 @@ acquireFormState(want: Want): Promise&lt;formInfo.FormStateInfo&gt;
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Want from '@ohos.app.ability.Want'; import Want from '@ohos.app.ability.Want';
import formInfo from '@ohos.app.form.formInfo'; import formInfo from '@ohos.app.form.formInfo';
import Base from '@ohos.base';
let want: Want = { let want: Want = {
'deviceId': '', 'deviceId': '',
...@@ -1538,6 +1565,7 @@ notifyFormsVisible(formIds: Array&lt;string&gt;, isVisible: boolean, callback: A ...@@ -1538,6 +1565,7 @@ notifyFormsVisible(formIds: Array&lt;string&gt;, isVisible: boolean, callback: A
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
let formIds: string[] = new Array('12400633174999288', '12400633174999289'); let formIds: string[] = new Array('12400633174999288', '12400633174999289');
try { try {
...@@ -1592,6 +1620,7 @@ notifyFormsVisible(formIds: Array&lt;string&gt;, isVisible: boolean): Promise&lt ...@@ -1592,6 +1620,7 @@ notifyFormsVisible(formIds: Array&lt;string&gt;, isVisible: boolean): Promise&lt
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
let formIds: string[] = new Array('12400633174999288', '12400633174999289'); let formIds: string[] = new Array('12400633174999288', '12400633174999289');
try { try {
...@@ -1641,6 +1670,7 @@ notifyFormsEnableUpdate(formIds: Array&lt;string&gt;, isEnableUpdate: boolean, c ...@@ -1641,6 +1670,7 @@ notifyFormsEnableUpdate(formIds: Array&lt;string&gt;, isEnableUpdate: boolean, c
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
let formIds: string[] = new Array('12400633174999288', '12400633174999289'); let formIds: string[] = new Array('12400633174999288', '12400633174999289');
try { try {
...@@ -1695,6 +1725,7 @@ notifyFormsEnableUpdate(formIds: Array&lt;string&gt;, isEnableUpdate: boolean): ...@@ -1695,6 +1725,7 @@ notifyFormsEnableUpdate(formIds: Array&lt;string&gt;, isEnableUpdate: boolean):
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
let formIds: string[] = new Array('12400633174999288', '12400633174999289'); let formIds: string[] = new Array('12400633174999288', '12400633174999289');
try { try {
...@@ -1743,6 +1774,7 @@ shareForm(formId: string, deviceId: string, callback: AsyncCallback&lt;void&gt;) ...@@ -1743,6 +1774,7 @@ shareForm(formId: string, deviceId: string, callback: AsyncCallback&lt;void&gt;)
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
let deviceId: string = 'EFC11C0C53628D8CC2F8CB5052477E130D075917034613B9884C55CD22B3DEF2'; let deviceId: string = 'EFC11C0C53628D8CC2F8CB5052477E130D075917034613B9884C55CD22B3DEF2';
...@@ -1798,6 +1830,7 @@ shareForm(formId: string, deviceId: string): Promise&lt;void&gt; ...@@ -1798,6 +1830,7 @@ shareForm(formId: string, deviceId: string): Promise&lt;void&gt;
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
let deviceId: string = 'EFC11C0C53628D8CC2F8CB5052477E130D075917034613B9884C55CD22B3DEF2'; let deviceId: string = 'EFC11C0C53628D8CC2F8CB5052477E130D075917034613B9884C55CD22B3DEF2';
...@@ -1847,6 +1880,7 @@ notifyFormsPrivacyProtected(formIds: Array\<string>, isProtected: boolean, callb ...@@ -1847,6 +1880,7 @@ notifyFormsPrivacyProtected(formIds: Array\<string>, isProtected: boolean, callb
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
let formIds: string[] = new Array('12400633174999288', '12400633174999289'); let formIds: string[] = new Array('12400633174999288', '12400633174999289');
try { try {
...@@ -1898,6 +1932,7 @@ notifyFormsPrivacyProtected(formIds: Array\<string\>, isProtected: boolean): Pro ...@@ -1898,6 +1932,7 @@ notifyFormsPrivacyProtected(formIds: Array\<string\>, isProtected: boolean): Pro
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
let formIds: string[] = new Array('12400633174999288', '12400633174999289'); let formIds: string[] = new Array('12400633174999288', '12400633174999289');
try { try {
...@@ -1996,6 +2031,7 @@ acquireFormData(formId: string): Promise<{[key: string]: Object}>; ...@@ -1996,6 +2031,7 @@ acquireFormData(formId: string): Promise<{[key: string]: Object}>;
```ts ```ts
import formHost from '@ohos.app.form.formHost'; import formHost from '@ohos.app.form.formHost';
import Base from '@ohos.base';
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
try { try {
......
...@@ -9,7 +9,6 @@ FormProvider模块提供了卡片提供方相关接口的能力,开发者在 ...@@ -9,7 +9,6 @@ FormProvider模块提供了卡片提供方相关接口的能力,开发者在
```ts ```ts
import formProvider from '@ohos.app.form.formProvider'; import formProvider from '@ohos.app.form.formProvider';
import Base from '@ohos.base';
``` ```
## setFormNextRefreshTime ## setFormNextRefreshTime
...@@ -46,6 +45,8 @@ setFormNextRefreshTime(formId: string, minute: number, callback: AsyncCallback&l ...@@ -46,6 +45,8 @@ setFormNextRefreshTime(formId: string, minute: number, callback: AsyncCallback&l
**示例:** **示例:**
```ts ```ts
import Base from '@ohos.base';
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
try { try {
formProvider.setFormNextRefreshTime(formId, 5, (error: Base.BusinessError) => { formProvider.setFormNextRefreshTime(formId, 5, (error: Base.BusinessError) => {
...@@ -99,6 +100,8 @@ setFormNextRefreshTime(formId: string, minute: number): Promise&lt;void&gt; ...@@ -99,6 +100,8 @@ setFormNextRefreshTime(formId: string, minute: number): Promise&lt;void&gt;
**示例:** **示例:**
```ts ```ts
import Base from '@ohos.base';
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
try { try {
formProvider.setFormNextRefreshTime(formId, 5).then(() => { formProvider.setFormNextRefreshTime(formId, 5).then(() => {
...@@ -145,6 +148,7 @@ updateForm(formId: string, formBindingData: formBindingData.FormBindingData,call ...@@ -145,6 +148,7 @@ updateForm(formId: string, formBindingData: formBindingData.FormBindingData,call
```ts ```ts
import formBindingData from '@ohos.app.form.formBindingData'; import formBindingData from '@ohos.app.form.formBindingData';
import Base from '@ohos.base';
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
try { try {
...@@ -208,6 +212,7 @@ updateForm(formId: string, formBindingData: formBindingData.FormBindingData): Pr ...@@ -208,6 +212,7 @@ updateForm(formId: string, formBindingData: formBindingData.FormBindingData): Pr
```ts ```ts
import formBindingData from '@ohos.app.form.formBindingData'; import formBindingData from '@ohos.app.form.formBindingData';
import Base from '@ohos.base';
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
class createFormBindingDataParamType { class createFormBindingDataParamType {
...@@ -353,6 +358,7 @@ getFormsInfo(filter?: formInfo.FormInfoFilter): Promise&lt;Array&lt;formInfo.For ...@@ -353,6 +358,7 @@ getFormsInfo(filter?: formInfo.FormInfoFilter): Promise&lt;Array&lt;formInfo.For
```ts ```ts
import formInfo from '@ohos.app.form.formInfo'; import formInfo from '@ohos.app.form.formInfo';
import Base from '@ohos.base';
const filter: formInfo.FormInfoFilter = { const filter: formInfo.FormInfoFilter = {
// get info of forms belong to module entry. // get info of forms belong to module entry.
...@@ -404,6 +410,7 @@ requestPublishForm(want: Want, formBindingData: formBindingData.FormBindingData, ...@@ -404,6 +410,7 @@ requestPublishForm(want: Want, formBindingData: formBindingData.FormBindingData,
```ts ```ts
import formBindingData from '@ohos.app.form.formBindingData'; import formBindingData from '@ohos.app.form.formBindingData';
import Want from '@ohos.app.ability.Want'; import Want from '@ohos.app.ability.Want';
import Base from '@ohos.base';
let want: Want = { let want: Want = {
abilityName: 'FormAbility', abilityName: 'FormAbility',
...@@ -468,6 +475,7 @@ requestPublishForm(want: Want, callback: AsyncCallback&lt;string&gt;): void ...@@ -468,6 +475,7 @@ requestPublishForm(want: Want, callback: AsyncCallback&lt;string&gt;): void
```ts ```ts
import Want from '@ohos.app.ability.Want'; import Want from '@ohos.app.ability.Want';
import Base from '@ohos.base';
let want: Want = { let want: Want = {
abilityName: 'FormAbility', abilityName: 'FormAbility',
...@@ -529,6 +537,7 @@ requestPublishForm(want: Want, formBindingData?: formBindingData.FormBindingData ...@@ -529,6 +537,7 @@ requestPublishForm(want: Want, formBindingData?: formBindingData.FormBindingData
```ts ```ts
import Want from '@ohos.app.ability.Want'; import Want from '@ohos.app.ability.Want';
import Base from '@ohos.base';
let want: Want = { let want: Want = {
abilityName: 'FormAbility', abilityName: 'FormAbility',
...@@ -580,6 +589,7 @@ isRequestPublishFormSupported(callback: AsyncCallback&lt;boolean&gt;): void ...@@ -580,6 +589,7 @@ isRequestPublishFormSupported(callback: AsyncCallback&lt;boolean&gt;): void
```ts ```ts
import Want from '@ohos.app.ability.Want'; import Want from '@ohos.app.ability.Want';
import Base from '@ohos.base';
try { try {
formProvider.isRequestPublishFormSupported((error: Base.BusinessError, isSupported: boolean) => { formProvider.isRequestPublishFormSupported((error: Base.BusinessError, isSupported: boolean) => {
...@@ -644,6 +654,7 @@ isRequestPublishFormSupported(): Promise&lt;boolean&gt; ...@@ -644,6 +654,7 @@ isRequestPublishFormSupported(): Promise&lt;boolean&gt;
```ts ```ts
import Want from '@ohos.app.ability.Want'; import Want from '@ohos.app.ability.Want';
import Base from '@ohos.base';
try { try {
formProvider.isRequestPublishFormSupported().then((isSupported: boolean) => { formProvider.isRequestPublishFormSupported().then((isSupported: boolean) => {
......
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
import Configuration from '@ohos.application.Configuration'; import Configuration from '@ohos.application.Configuration';
``` ```
## 属性
**系统能力**:以下各项对应的系统能力均为SystemCapability.Ability.AbilityBase **系统能力**:以下各项对应的系统能力均为SystemCapability.Ability.AbilityBase
| 名称 | 类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
......
...@@ -12,7 +12,6 @@ formHost模块提供了卡片使用方相关接口的能力,包括对使用方 ...@@ -12,7 +12,6 @@ formHost模块提供了卡片使用方相关接口的能力,包括对使用方
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
``` ```
## deleteForm ## deleteForm
...@@ -71,6 +70,7 @@ deleteForm(formId: string): Promise&lt;void&gt; ...@@ -71,6 +70,7 @@ deleteForm(formId: string): Promise&lt;void&gt;
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
formHost.deleteForm(formId).then(() => { formHost.deleteForm(formId).then(() => {
...@@ -101,6 +101,7 @@ releaseForm(formId: string, callback: AsyncCallback&lt;void&gt;): void ...@@ -101,6 +101,7 @@ releaseForm(formId: string, callback: AsyncCallback&lt;void&gt;): void
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
formHost.releaseForm(formId, (error: Base.BusinessError) => { formHost.releaseForm(formId, (error: Base.BusinessError) => {
...@@ -134,6 +135,7 @@ releaseForm(formId: string, isReleaseCache: boolean, callback: AsyncCallback&lt; ...@@ -134,6 +135,7 @@ releaseForm(formId: string, isReleaseCache: boolean, callback: AsyncCallback&lt;
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
formHost.releaseForm(formId, true, (error: Base.BusinessError) => { formHost.releaseForm(formId, true, (error: Base.BusinessError) => {
...@@ -172,6 +174,7 @@ releaseForm(formId: string, isReleaseCache?: boolean): Promise&lt;void&gt; ...@@ -172,6 +174,7 @@ releaseForm(formId: string, isReleaseCache?: boolean): Promise&lt;void&gt;
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
formHost.releaseForm(formId, true).then(() => { formHost.releaseForm(formId, true).then(() => {
...@@ -202,6 +205,7 @@ requestForm(formId: string, callback: AsyncCallback&lt;void&gt;): void ...@@ -202,6 +205,7 @@ requestForm(formId: string, callback: AsyncCallback&lt;void&gt;): void
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
formHost.requestForm(formId, (error: Base.BusinessError) => { formHost.requestForm(formId, (error: Base.BusinessError) => {
...@@ -237,6 +241,7 @@ requestForm(formId: string): Promise&lt;void&gt; ...@@ -237,6 +241,7 @@ requestForm(formId: string): Promise&lt;void&gt;
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
formHost.requestForm(formId).then(() => { formHost.requestForm(formId).then(() => {
...@@ -267,6 +272,7 @@ castTempForm(formId: string, callback: AsyncCallback&lt;void&gt;): void ...@@ -267,6 +272,7 @@ castTempForm(formId: string, callback: AsyncCallback&lt;void&gt;): void
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
formHost.castTempForm(formId, (error: Base.BusinessError) => { formHost.castTempForm(formId, (error: Base.BusinessError) => {
...@@ -302,6 +308,7 @@ castTempForm(formId: string): Promise&lt;void&gt; ...@@ -302,6 +308,7 @@ castTempForm(formId: string): Promise&lt;void&gt;
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
formHost.castTempForm(formId).then(() => { formHost.castTempForm(formId).then(() => {
...@@ -332,6 +339,7 @@ notifyVisibleForms(formIds: Array&lt;string&gt;, callback: AsyncCallback&lt;void ...@@ -332,6 +339,7 @@ notifyVisibleForms(formIds: Array&lt;string&gt;, callback: AsyncCallback&lt;void
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
let formId: string[] = ['12400633174999288']; let formId: string[] = ['12400633174999288'];
formHost.notifyVisibleForms(formId, (error: Base.BusinessError) => { formHost.notifyVisibleForms(formId, (error: Base.BusinessError) => {
...@@ -367,6 +375,7 @@ notifyVisibleForms(formIds: Array&lt;string&gt;): Promise&lt;void&gt; ...@@ -367,6 +375,7 @@ notifyVisibleForms(formIds: Array&lt;string&gt;): Promise&lt;void&gt;
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
let formId: string[] = ['12400633174999288']; let formId: string[] = ['12400633174999288'];
formHost.notifyVisibleForms(formId).then(() => { formHost.notifyVisibleForms(formId).then(() => {
...@@ -397,6 +406,7 @@ notifyInvisibleForms(formIds: Array&lt;string&gt;, callback: AsyncCallback&lt;vo ...@@ -397,6 +406,7 @@ notifyInvisibleForms(formIds: Array&lt;string&gt;, callback: AsyncCallback&lt;vo
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
let formId: string[] = ['12400633174999288']; let formId: string[] = ['12400633174999288'];
formHost.notifyInvisibleForms(formId, (error: Base.BusinessError) => { formHost.notifyInvisibleForms(formId, (error: Base.BusinessError) => {
...@@ -432,6 +442,7 @@ notifyInvisibleForms(formIds: Array&lt;string&gt;): Promise&lt;void&gt; ...@@ -432,6 +442,7 @@ notifyInvisibleForms(formIds: Array&lt;string&gt;): Promise&lt;void&gt;
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
let formId: string[] = ['12400633174999288']; let formId: string[] = ['12400633174999288'];
formHost.notifyInvisibleForms(formId).then(() => { formHost.notifyInvisibleForms(formId).then(() => {
...@@ -462,6 +473,7 @@ enableFormsUpdate(formIds: Array&lt;string&gt;, callback: AsyncCallback&lt;void& ...@@ -462,6 +473,7 @@ enableFormsUpdate(formIds: Array&lt;string&gt;, callback: AsyncCallback&lt;void&
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
let formId: string[] = ['12400633174999288']; let formId: string[] = ['12400633174999288'];
formHost.enableFormsUpdate(formId, (error: Base.BusinessError) => { formHost.enableFormsUpdate(formId, (error: Base.BusinessError) => {
...@@ -497,6 +509,7 @@ enableFormsUpdate(formIds: Array&lt;string&gt;): Promise&lt;void&gt; ...@@ -497,6 +509,7 @@ enableFormsUpdate(formIds: Array&lt;string&gt;): Promise&lt;void&gt;
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
let formId: string[] = ['12400633174999288']; let formId: string[] = ['12400633174999288'];
formHost.enableFormsUpdate(formId).then(() => { formHost.enableFormsUpdate(formId).then(() => {
...@@ -527,6 +540,7 @@ disableFormsUpdate(formIds: Array&lt;string&gt;, callback: AsyncCallback&lt;void ...@@ -527,6 +540,7 @@ disableFormsUpdate(formIds: Array&lt;string&gt;, callback: AsyncCallback&lt;void
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
let formId: string[] = ['12400633174999288']; let formId: string[] = ['12400633174999288'];
formHost.disableFormsUpdate(formId, (error: Base.BusinessError) => { formHost.disableFormsUpdate(formId, (error: Base.BusinessError) => {
...@@ -562,6 +576,7 @@ disableFormsUpdate(formIds: Array&lt;string&gt;): Promise&lt;void&gt; ...@@ -562,6 +576,7 @@ disableFormsUpdate(formIds: Array&lt;string&gt;): Promise&lt;void&gt;
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
let formId: string[] = ['12400633174999288']; let formId: string[] = ['12400633174999288'];
formHost.disableFormsUpdate(formId).then(() => { formHost.disableFormsUpdate(formId).then(() => {
...@@ -589,6 +604,7 @@ isSystemReady(callback: AsyncCallback&lt;void&gt;): void ...@@ -589,6 +604,7 @@ isSystemReady(callback: AsyncCallback&lt;void&gt;): void
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
formHost.isSystemReady((error: Base.BusinessError) => { formHost.isSystemReady((error: Base.BusinessError) => {
...@@ -616,6 +632,7 @@ isSystemReady(): Promise&lt;void&gt; ...@@ -616,6 +632,7 @@ isSystemReady(): Promise&lt;void&gt;
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
formHost.isSystemReady().then(() => { formHost.isSystemReady().then(() => {
...@@ -646,6 +663,7 @@ getAllFormsInfo(callback: AsyncCallback&lt;Array&lt;formInfo.FormInfo&gt;&gt;): ...@@ -646,6 +663,7 @@ getAllFormsInfo(callback: AsyncCallback&lt;Array&lt;formInfo.FormInfo&gt;&gt;):
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import formInfo from '@ohos.app.form.formInfo'; import formInfo from '@ohos.app.form.formInfo';
import Base from '@ohos.base';
formHost.getAllFormsInfo((error: Base.BusinessError, data: formInfo.FormInfo[]) => { formHost.getAllFormsInfo((error: Base.BusinessError, data: formInfo.FormInfo[]) => {
if (error.code) { if (error.code) {
...@@ -677,6 +695,7 @@ getAllFormsInfo(): Promise&lt;Array&lt;formInfo.FormInfo&gt;&gt; ...@@ -677,6 +695,7 @@ getAllFormsInfo(): Promise&lt;Array&lt;formInfo.FormInfo&gt;&gt;
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import formInfo from '@ohos.app.form.formInfo'; import formInfo from '@ohos.app.form.formInfo';
import Base from '@ohos.base';
formHost.getAllFormsInfo().then((data: formInfo.FormInfo[]) => { formHost.getAllFormsInfo().then((data: formInfo.FormInfo[]) => {
console.log('formHost getAllFormsInfo data: ${JSON.stringify(data)}'); console.log('formHost getAllFormsInfo data: ${JSON.stringify(data)}');
...@@ -707,6 +726,7 @@ getFormsInfo(bundleName: string, callback: AsyncCallback&lt;Array&lt;formInfo.Fo ...@@ -707,6 +726,7 @@ getFormsInfo(bundleName: string, callback: AsyncCallback&lt;Array&lt;formInfo.Fo
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import formInfo from '@ohos.app.form.formInfo'; import formInfo from '@ohos.app.form.formInfo';
import Base from '@ohos.base';
formHost.getFormsInfo('com.example.ohos.formjsdemo', (error: Base.BusinessError, data: formInfo.FormInfo[]) => { formHost.getFormsInfo('com.example.ohos.formjsdemo', (error: Base.BusinessError, data: formInfo.FormInfo[]) => {
if (error.code) { if (error.code) {
...@@ -740,6 +760,7 @@ getFormsInfo(bundleName: string, moduleName: string, callback: AsyncCallback&lt; ...@@ -740,6 +760,7 @@ getFormsInfo(bundleName: string, moduleName: string, callback: AsyncCallback&lt;
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import formInfo from '@ohos.app.form.formInfo'; import formInfo from '@ohos.app.form.formInfo';
import Base from '@ohos.base';
formHost.getFormsInfo('com.example.ohos.formjsdemo', 'entry', (error: Base.BusinessError, data: formInfo.FormInfo[]) => { formHost.getFormsInfo('com.example.ohos.formjsdemo', 'entry', (error: Base.BusinessError, data: formInfo.FormInfo[]) => {
if (error.code) { if (error.code) {
...@@ -777,6 +798,8 @@ getFormsInfo(bundleName: string, moduleName?: string): Promise&lt;Array&lt;formI ...@@ -777,6 +798,8 @@ getFormsInfo(bundleName: string, moduleName?: string): Promise&lt;Array&lt;formI
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
formHost.getFormsInfo('com.example.ohos.formjsdemo', 'entry').then((data: formInfo.FormInfo[]) => { formHost.getFormsInfo('com.example.ohos.formjsdemo', 'entry').then((data: formInfo.FormInfo[]) => {
console.log(`formHost getFormsInfo, data: ${JSON.stringify(data)}`); console.log(`formHost getFormsInfo, data: ${JSON.stringify(data)}`);
...@@ -806,6 +829,7 @@ deleteInvalidForms(formIds: Array&lt;string&gt;, callback: AsyncCallback&lt;numb ...@@ -806,6 +829,7 @@ deleteInvalidForms(formIds: Array&lt;string&gt;, callback: AsyncCallback&lt;numb
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
let formIds: string[] = new Array('12400633174999288', '12400633174999289'); let formIds: string[] = new Array('12400633174999288', '12400633174999289');
formHost.deleteInvalidForms(formIds, (error: Base.BusinessError, data: number) => { formHost.deleteInvalidForms(formIds, (error: Base.BusinessError, data: number) => {
...@@ -843,6 +867,7 @@ deleteInvalidForms(formIds: Array&lt;string&gt;): Promise&lt;number&gt; ...@@ -843,6 +867,7 @@ deleteInvalidForms(formIds: Array&lt;string&gt;): Promise&lt;number&gt;
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
let formIds: string[] = new Array('12400633174999288', '12400633174999289'); let formIds: string[] = new Array('12400633174999288', '12400633174999289');
formHost.deleteInvalidForms(formIds).then((data: number) => { formHost.deleteInvalidForms(formIds).then((data: number) => {
...@@ -875,6 +900,7 @@ acquireFormState(want: Want, callback: AsyncCallback&lt;formInfo.FormStateInfo&g ...@@ -875,6 +900,7 @@ acquireFormState(want: Want, callback: AsyncCallback&lt;formInfo.FormStateInfo&g
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Want from '@ohos.app.ability.Want'; import Want from '@ohos.app.ability.Want';
import formInfo from '@ohos.app.form.formInfo'; import formInfo from '@ohos.app.form.formInfo';
import Base from '@ohos.base';
let want: Want = { let want: Want = {
'deviceId': '', 'deviceId': '',
...@@ -923,6 +949,7 @@ acquireFormState(want: Want): Promise&lt;formInfo.FormStateInfo&gt; ...@@ -923,6 +949,7 @@ acquireFormState(want: Want): Promise&lt;formInfo.FormStateInfo&gt;
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Want from '@ohos.app.ability.Want'; import Want from '@ohos.app.ability.Want';
import formInfo from '@ohos.app.form.formInfo'; import formInfo from '@ohos.app.form.formInfo';
import Base from '@ohos.base';
let want: Want = { let want: Want = {
'deviceId': '', 'deviceId': '',
...@@ -1013,6 +1040,7 @@ notifyFormsVisible(formIds: Array&lt;string&gt;, isVisible: boolean, callback: A ...@@ -1013,6 +1040,7 @@ notifyFormsVisible(formIds: Array&lt;string&gt;, isVisible: boolean, callback: A
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
let formIds: string[]= new Array('12400633174999288', '12400633174999289'); let formIds: string[]= new Array('12400633174999288', '12400633174999289');
formHost.notifyFormsVisible(formIds, true, (error: Base.BusinessError) => { formHost.notifyFormsVisible(formIds, true, (error: Base.BusinessError) => {
...@@ -1049,6 +1077,7 @@ notifyFormsVisible(formIds: Array&lt;string&gt;, isVisible: boolean): Promise&lt ...@@ -1049,6 +1077,7 @@ notifyFormsVisible(formIds: Array&lt;string&gt;, isVisible: boolean): Promise&lt
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
let formIds: string[] = new Array('12400633174999288', '12400633174999289'); let formIds: string[] = new Array('12400633174999288', '12400633174999289');
formHost.notifyFormsVisible(formIds, true).then(() => { formHost.notifyFormsVisible(formIds, true).then(() => {
...@@ -1080,6 +1109,7 @@ notifyFormsEnableUpdate(formIds: Array&lt;string&gt;, isEnableUpdate: boolean, c ...@@ -1080,6 +1109,7 @@ notifyFormsEnableUpdate(formIds: Array&lt;string&gt;, isEnableUpdate: boolean, c
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
let formIds: string[] = new Array('12400633174999288', '12400633174999289'); let formIds: string[] = new Array('12400633174999288', '12400633174999289');
formHost.notifyFormsEnableUpdate(formIds, true, (error: Base.BusinessError) => { formHost.notifyFormsEnableUpdate(formIds, true, (error: Base.BusinessError) => {
...@@ -1116,6 +1146,7 @@ notifyFormsEnableUpdate(formIds: Array&lt;string&gt;, isEnableUpdate: boolean): ...@@ -1116,6 +1146,7 @@ notifyFormsEnableUpdate(formIds: Array&lt;string&gt;, isEnableUpdate: boolean):
```ts ```ts
import formHost from '@ohos.application.formHost'; import formHost from '@ohos.application.formHost';
import Base from '@ohos.base';
let formIds: string[] = new Array('12400633174999288', '12400633174999289'); let formIds: string[] = new Array('12400633174999288', '12400633174999289');
formHost.notifyFormsEnableUpdate(formIds, true).then(() => { formHost.notifyFormsEnableUpdate(formIds, true).then(() => {
......
...@@ -10,7 +10,6 @@ FormProvider模块提供了卡片提供方相关接口的能力,开发者在 ...@@ -10,7 +10,6 @@ FormProvider模块提供了卡片提供方相关接口的能力,开发者在
```ts ```ts
import formProvider from '@ohos.application.formProvider'; import formProvider from '@ohos.application.formProvider';
import Base from '@ohos.base'
``` ```
## setFormNextRefreshTime ## setFormNextRefreshTime
...@@ -32,6 +31,8 @@ setFormNextRefreshTime(formId: string, minute: number, callback: AsyncCallback&l ...@@ -32,6 +31,8 @@ setFormNextRefreshTime(formId: string, minute: number, callback: AsyncCallback&l
**示例:** **示例:**
```ts ```ts
import Base from '@ohos.base'
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
formProvider.setFormNextRefreshTime(formId, 5, (error: Base.BusinessError) => { formProvider.setFormNextRefreshTime(formId, 5, (error: Base.BusinessError) => {
if (error.code) { if (error.code) {
...@@ -64,6 +65,8 @@ setFormNextRefreshTime(formId: string, minute: number): Promise&lt;void&gt; ...@@ -64,6 +65,8 @@ setFormNextRefreshTime(formId: string, minute: number): Promise&lt;void&gt;
**示例:** **示例:**
```ts ```ts
import Base from '@ohos.base'
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
formProvider.setFormNextRefreshTime(formId, 5).then(() => { formProvider.setFormNextRefreshTime(formId, 5).then(() => {
console.log('formProvider setFormNextRefreshTime success'); console.log('formProvider setFormNextRefreshTime success');
...@@ -92,6 +95,7 @@ updateForm(formId: string, formBindingData: formBindingData.FormBindingData,call ...@@ -92,6 +95,7 @@ updateForm(formId: string, formBindingData: formBindingData.FormBindingData,call
```ts ```ts
import formBindingData from '@ohos.app.form.formBindingData'; import formBindingData from '@ohos.app.form.formBindingData';
import Base from '@ohos.base'
let formId = '12400633174999288'; let formId = '12400633174999288';
class createBindingDataType { class createBindingDataType {
...@@ -135,6 +139,7 @@ updateForm(formId: string, formBindingData: formBindingData.FormBindingData): Pr ...@@ -135,6 +139,7 @@ updateForm(formId: string, formBindingData: formBindingData.FormBindingData): Pr
```ts ```ts
import formBindingData from '@ohos.application.formBindingData'; import formBindingData from '@ohos.application.formBindingData';
import Base from '@ohos.base'
let formId: string = '12400633174999288'; let formId: string = '12400633174999288';
class createBindingDataType { class createBindingDataType {
......
...@@ -13,7 +13,6 @@ FormExtensionContext模块提供FormExtensionAbility具有的接口和能力。 ...@@ -13,7 +13,6 @@ FormExtensionContext模块提供FormExtensionAbility具有的接口和能力。
```ts ```ts
import common from '@ohos.app.ability.common'; import common from '@ohos.app.ability.common';
import Base from '@ohos.base';
``` ```
## FormExtensionContext.startAbility ## FormExtensionContext.startAbility
...@@ -51,6 +50,7 @@ startAbility(want: Want, callback: AsyncCallback&lt;void&gt;): void ...@@ -51,6 +50,7 @@ startAbility(want: Want, callback: AsyncCallback&lt;void&gt;): void
```ts ```ts
import FormExtensionAbility from '@ohos.app.form.FormExtensionAbility'; import FormExtensionAbility from '@ohos.app.form.FormExtensionAbility';
import Want from '@ohos.app.ability.Want'; import Want from '@ohos.app.ability.Want';
import Base from '@ohos.base';
export default class MyFormExtensionAbility extends FormExtensionAbility { export default class MyFormExtensionAbility extends FormExtensionAbility {
onFormEvent(formId: string, message: string) { onFormEvent(formId: string, message: string) {
...@@ -115,6 +115,7 @@ startAbility(want: Want): Promise&lt;void&gt; ...@@ -115,6 +115,7 @@ startAbility(want: Want): Promise&lt;void&gt;
```ts ```ts
import FormExtensionAbility from '@ohos.app.form.FormExtensionAbility'; import FormExtensionAbility from '@ohos.app.form.FormExtensionAbility';
import Want from '@ohos.app.ability.Want'; import Want from '@ohos.app.ability.Want';
import Base from '@ohos.base';
export default class MyFormExtensionAbility extends FormExtensionAbility { export default class MyFormExtensionAbility extends FormExtensionAbility {
onFormEvent(formId: string, message: string) { onFormEvent(formId: string, message: string) {
...@@ -250,6 +251,7 @@ disconnectServiceExtensionAbility(connection: number, callback:AsyncCallback&lt; ...@@ -250,6 +251,7 @@ disconnectServiceExtensionAbility(connection: number, callback:AsyncCallback&lt;
import FormExtensionAbility from '@ohos.app.form.FormExtensionAbility'; import FormExtensionAbility from '@ohos.app.form.FormExtensionAbility';
import rpc from '@ohos.rpc'; import rpc from '@ohos.rpc';
import common from '@ohos.app.ability.common'; import common from '@ohos.app.ability.common';
import Base from '@ohos.base';
// commRemote为onConnect回调内返回的remote对象,此处定义为null无任何实际意义,仅作示例 // commRemote为onConnect回调内返回的remote对象,此处定义为null无任何实际意义,仅作示例
let commRemote: rpc.IRemoteObject | null = null; let commRemote: rpc.IRemoteObject | null = null;
...@@ -316,6 +318,7 @@ disconnectServiceExtensionAbility(connection: number): Promise&lt;void&gt;; ...@@ -316,6 +318,7 @@ disconnectServiceExtensionAbility(connection: number): Promise&lt;void&gt;;
import FormExtensionAbility from '@ohos.app.form.FormExtensionAbility'; import FormExtensionAbility from '@ohos.app.form.FormExtensionAbility';
import rpc from '@ohos.rpc'; import rpc from '@ohos.rpc';
import common from '@ohos.app.ability.common'; import common from '@ohos.app.ability.common';
import Base from '@ohos.base';
// commRemote为onConnect回调内返回的remote对象,此处定义为null无任何实际意义,仅作示例 // commRemote为onConnect回调内返回的remote对象,此处定义为null无任何实际意义,仅作示例
let commRemote: rpc.IRemoteObject | null = null; let commRemote: rpc.IRemoteObject | null = null;
......
...@@ -770,7 +770,7 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\ ...@@ -770,7 +770,7 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\
## ServiceExtensionContext.startAbilityAsCaller<sup>10+<sup> ## ServiceExtensionContext.startAbilityAsCaller<sup>10+<sup>
starAbilityAsCaller(want: Want, callback: AsyncCallback\<void>): void; startAbilityAsCaller(want: Want, callback: AsyncCallback\<void>): void;
使用设置的caller信息启动一个Ability,caller信息由want携带,在系统服务层识别,Ability可以在onCreate生命周期的want参数中获取到caller信息。使用该接口启动一个Ability时,want的caller信息不会被当前自身的应用信息覆盖,系统服务层可获取到初始caller的信息。使用callback异步回调。 使用设置的caller信息启动一个Ability,caller信息由want携带,在系统服务层识别,Ability可以在onCreate生命周期的want参数中获取到caller信息。使用该接口启动一个Ability时,want的caller信息不会被当前自身的应用信息覆盖,系统服务层可获取到初始caller的信息。使用callback异步回调。
......
...@@ -3000,7 +3000,7 @@ startAbilityByCallWithAccount(want: Want, accountId: number): Promise&lt;Caller& ...@@ -3000,7 +3000,7 @@ startAbilityByCallWithAccount(want: Want, accountId: number): Promise&lt;Caller&
## UIAbilityContext.startAbilityAsCaller<sup>10+<sup> ## UIAbilityContext.startAbilityAsCaller<sup>10+<sup>
starAbilityAsCaller(want: Want, callback: AsyncCallback\<void>): void; startAbilityAsCaller(want: Want, callback: AsyncCallback\<void>): void;
使用设置的caller信息启动一个Ability,caller信息由want携带,在系统服务层识别,Ability可以在onCreate生命周期的want参数中获取到caller信息。使用该接口启动一个Ability时,want的caller信息不会被当前自身的应用信息覆盖,系统服务层可获取到初始caller的信息。使用callback异步回调。 使用设置的caller信息启动一个Ability,caller信息由want携带,在系统服务层识别,Ability可以在onCreate生命周期的want参数中获取到caller信息。使用该接口启动一个Ability时,want的caller信息不会被当前自身的应用信息覆盖,系统服务层可获取到初始caller的信息。使用callback异步回调。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册