Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
9e01c802
D
Docs
项目概览
OpenHarmony
/
Docs
12 个月 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9e01c802
编写于
5月 27, 2022
作者:
Y
yuyaozhi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix code error of ability
Signed-off-by:
N
yuyaozhi
<
yuyaozhi@huawei.com
>
上级
3e41566d
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
75 addition
and
68 deletion
+75
-68
zh-cn/application-dev/reference/apis/js-apis-ability-context.md
...application-dev/reference/apis/js-apis-ability-context.md
+1
-1
zh-cn/application-dev/reference/apis/js-apis-appmanager.md
zh-cn/application-dev/reference/apis/js-apis-appmanager.md
+4
-4
zh-cn/application-dev/reference/apis/js-apis-dataAbilityHelper.md
...plication-dev/reference/apis/js-apis-dataAbilityHelper.md
+11
-10
zh-cn/application-dev/reference/apis/js-apis-formextension.md
...n/application-dev/reference/apis/js-apis-formextension.md
+2
-2
zh-cn/application-dev/reference/apis/js-apis-particleAbility.md
...application-dev/reference/apis/js-apis-particleAbility.md
+16
-9
zh-cn/application-dev/reference/apis/js-apis-service-extension-ability.md
...n-dev/reference/apis/js-apis-service-extension-ability.md
+1
-1
zh-cn/application-dev/reference/apis/js-apis-wantAgent.md
zh-cn/application-dev/reference/apis/js-apis-wantAgent.md
+40
-41
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-ability-context.md
浏览文件 @
9e01c802
...
...
@@ -378,7 +378,7 @@ startAbilityByCall(want: Want): Promise<Caller>;
deviceId
:
""
}).
then
((
obj
)
=>
{
caller
=
obj
;
console
.
log
(
'
Caller GetCaller Get
'
+
call
);
console
.
log
(
'
Caller GetCaller Get
'
+
call
er
);
}).
catch
((
e
)
=>
{
console
.
log
(
'
Caller GetCaller error
'
+
e
);
});
...
...
zh-cn/application-dev/reference/apis/js-apis-appmanager.md
浏览文件 @
9e01c802
...
...
@@ -82,7 +82,7 @@ isRamConstrainedDevice(): Promise\<boolean>;
**示例:**
```
js
app
.
isRamConstrainedDevice
Promise
().
then
((
data
)
=>
{
app
.
isRamConstrainedDevice
().
then
((
data
)
=>
{
console
.
log
(
'
success:
'
+
JSON
.
stringify
(
data
));
}).
catch
((
error
)
=>
{
console
.
log
(
'
failed:
'
+
JSON
.
stringify
(
error
));
...
...
@@ -106,7 +106,7 @@ isRamConstrainedDevice(callback: AsyncCallback\<boolean>): void;
**示例:**
```
js
app
.
isRamConstrainedDevice
Promise
((
err
,
data
)
=>
{
app
.
isRamConstrainedDevice
((
err
,
data
)
=>
{
console
.
log
(
'
startAbility result failed:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
'
startAbility result success:
'
+
JSON
.
stringify
(
data
));
})
...
...
@@ -175,7 +175,7 @@ getProcessRunningInfos(): Promise<Array\<ProcessRunningInfo>>;
**示例:**
```
js
app
.
G
etProcessRunningInfos
().
then
((
data
)
=>
{
app
.
g
etProcessRunningInfos
().
then
((
data
)
=>
{
console
.
log
(
'
success:
'
+
JSON
.
stringify
(
data
));
}).
catch
((
error
)
=>
{
console
.
log
(
'
failed:
'
+
JSON
.
stringify
(
error
));
...
...
@@ -199,7 +199,7 @@ getProcessRunningInfos(callback: AsyncCallback<Array\<ProcessRunningInfo>>): voi
**示例:**
```
js
app
.
G
etProcessRunningInfos
((
err
,
data
)
=>
{
app
.
g
etProcessRunningInfos
((
err
,
data
)
=>
{
console
.
log
(
'
startAbility result failed :
'
+
JSON
.
stringify
(
err
));
console
.
log
(
'
startAbility result success:
'
+
JSON
.
stringify
(
data
));
})
...
...
zh-cn/application-dev/reference/apis/js-apis-dataAbilityHelper.md
浏览文件 @
9e01c802
...
...
@@ -506,7 +506,7 @@ const valueBucket = {
"
name
"
:
"
rose
"
,
"
age
"
:
22
,
"
salary
"
:
200.5
,
"
blobType
"
:
u8
,
"
blobType
"
:
"
u8
"
,
}
DAHelper
.
insert
(
"
dataability:///com.example.DataAbility
"
,
...
...
@@ -548,7 +548,7 @@ const valueBucket = {
"
name
"
:
"
rose1
"
,
"
age
"
:
221
,
"
salary
"
:
20.5
,
"
blobType
"
:
u8
,
"
blobType
"
:
"
u8
"
,
}
DAHelper
.
insert
(
"
dataability:///com.example.DataAbility
"
,
...
...
@@ -581,9 +581,9 @@ import featureAbility from '@ohos.ability.featureAbility'
var
DAHelper
=
featureAbility
.
acquireDataAbilityHelper
(
"
dataability:///com.example.DataAbility
"
);
var
cars
=
new
Array
({
"
name
"
:
"
roe11
"
,
"
age
"
:
21
,
"
salary
"
:
20.5
,
"
blobType
"
:
u8
,},
{
"
name
"
:
"
roe12
"
,
"
age
"
:
21
,
"
salary
"
:
20.5
,
"
blobType
"
:
u8
,},
{
"
name
"
:
"
roe13
"
,
"
age
"
:
21
,
"
salary
"
:
20.5
,
"
blobType
"
:
u8
,})
var
cars
=
new
Array
({
"
name
"
:
"
roe11
"
,
"
age
"
:
21
,
"
salary
"
:
20.5
,
"
blobType
"
:
"
u8
"
,},
{
"
name
"
:
"
roe12
"
,
"
age
"
:
21
,
"
salary
"
:
20.5
,
"
blobType
"
:
"
u8
"
,},
{
"
name
"
:
"
roe13
"
,
"
age
"
:
21
,
"
salary
"
:
20.5
,
"
blobType
"
:
"
u8
"
,})
DAHelper
.
batchInsert
(
"
dataability:///com.example.DataAbility
"
,
cars
,
...
...
@@ -620,9 +620,9 @@ import featureAbility from '@ohos.ability.featureAbility'
var
DAHelper
=
featureAbility
.
acquireDataAbilityHelper
(
"
dataability:///com.example.DataAbility
"
);
var
cars
=
new
Array
({
"
name
"
:
"
roe11
"
,
"
age
"
:
21
,
"
salary
"
:
20.5
,
"
blobType
"
:
u8
,},
{
"
name
"
:
"
roe12
"
,
"
age
"
:
21
,
"
salary
"
:
20.5
,
"
blobType
"
:
u8
,},
{
"
name
"
:
"
roe13
"
,
"
age
"
:
21
,
"
salary
"
:
20.5
,
"
blobType
"
:
u8
,})
var
cars
=
new
Array
({
"
name
"
:
"
roe11
"
,
"
age
"
:
21
,
"
salary
"
:
20.5
,
"
blobType
"
:
"
u8
"
,},
{
"
name
"
:
"
roe12
"
,
"
age
"
:
21
,
"
salary
"
:
20.5
,
"
blobType
"
:
"
u8
"
,},
{
"
name
"
:
"
roe13
"
,
"
age
"
:
21
,
"
salary
"
:
20.5
,
"
blobType
"
:
"
u8
"
,})
DAHelper
.
batchInsert
(
"
dataability:///com.example.DataAbility
"
,
cars
...
...
@@ -689,6 +689,7 @@ delete(uri: string, predicates: dataAbility.DataAbilityPredicates): Promise\<num
```
js
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
ohos_data_ability
from
'
@ohos.data.dataability
'
var
DAHelper
=
featureAbility
.
acquireDataAbilityHelper
(
"
dataability:///com.example.DataAbility
"
);
...
...
@@ -730,7 +731,7 @@ const va = {
"
name
"
:
"
roe1
"
,
"
age
"
:
21
,
"
salary
"
:
20.5
,
"
blobType
"
:
u8
,
"
blobType
"
:
"
u8
"
,
}
let
da
=
new
ohos_data_ability
.
DataAbilityPredicates
()
DAHelper
.
update
(
...
...
@@ -776,7 +777,7 @@ const va = {
"
name
"
:
"
roe1
"
,
"
age
"
:
21
,
"
salary
"
:
20.5
,
"
blobType
"
:
u8
,
"
blobType
"
:
"
u8
"
,
}
let
da
=
new
ohos_data_ability
.
DataAbilityPredicates
()
DAHelper
.
update
(
...
...
zh-cn/application-dev/reference/apis/js-apis-formextension.md
浏览文件 @
9e01c802
...
...
@@ -213,7 +213,7 @@ onConfigurationUpdated(config: Configuration): void;
**示例:**
```
js
class
MyFormExtension
extends
My
FormExtension
{
class
MyFormExtension
extends
FormExtension
{
onConfigurationUpdated
(
config
)
{
console
.
log
(
'
onConfigurationUpdated, config:
'
+
JSON
.
stringify
(
config
));
}
...
...
@@ -237,7 +237,7 @@ onAcquireFormState?(want: Want): formInfo.FormState;
**示例:**
```
js
class
MyFormExtension
extends
My
FormExtension
{
class
MyFormExtension
extends
FormExtension
{
onAcquireFormState
(
want
)
{
console
.
log
(
'
FormExtension onAcquireFormState, want:
'
+
want
);
}
...
...
zh-cn/application-dev/reference/apis/js-apis-particleAbility.md
浏览文件 @
9e01c802
...
...
@@ -401,6 +401,7 @@ connectAbility(request: Want, options:ConnectOptions): number
**示例**
:
```
js
import
rpc
from
'
@ohos.rpc
'
function
onConnectCallback
(
element
,
remote
){
console
.
log
(
'
ConnectAbility onConnect remote is proxy:
'
+
(
remote
instanceof
rpc
.
RemoteProxy
));
}
...
...
@@ -422,8 +423,10 @@ connectAbility(request: Want, options:ConnectOptions): number
},
);
particleAbility
.
disconnectAbility
(
connId
).
then
((
error
,
data
)
=>
{
console
.
log
(
'
particleAbilityTest result errCode :
'
+
error
.
code
+
"
data:
"
+
data
);
particleAbility
.
disconnectAbility
(
connId
).
then
((
data
)
=>
{
console
.
log
(
"
data:
"
+
data
);
}).
catch
((
error
)
=>
{
console
.
log
(
'
particleAbilityTest result errCode :
'
+
error
.
code
)
});
...
...
@@ -447,6 +450,7 @@ disconnectAbility(connection: number, callback:AsyncCallback\<void>): void;
**示例**
:
```
js
import
rpc
from
'
@ohos.rpc
'
function
onConnectCallback
(
element
,
remote
){
console
.
log
(
'
ConnectAbility onConnect remote is proxy:
'
+
(
remote
instanceof
rpc
.
RemoteProxy
));
}
...
...
@@ -467,11 +471,11 @@ disconnectAbility(connection: number, callback:AsyncCallback\<void>): void;
onFailed
:
onFailedCallback
,
},
);
var
result
=
particleAbility
.
disconnectAbility
(
connId
,
(
error
,
data
)
=>
{
console
.
log
(
'
particleAbilityTest DisConnectJsSameBundleName result errCode :
'
+
error
.
code
+
"
data:
"
+
data
)
},
);
var
result
=
particleAbility
.
disconnectAbility
(
connId
).
then
((
data
)
=>
{
console
.
log
(
"
data:
"
+
data
);
}).
catch
((
error
)
=>
{
console
.
log
(
'
particleAbilityTest result errCode :
'
+
error
.
code
)
}
);
```
...
...
@@ -493,6 +497,7 @@ disconnectAbility(connection: number): Promise\<void>;
**示例**
:
```
js
import
rpc
from
'
@ohos.rpc
'
function
onConnectCallback
(
element
,
remote
){
console
.
log
(
'
ConnectAbility onConnect remote is proxy:
'
+
(
remote
instanceof
rpc
.
RemoteProxy
));
}
...
...
@@ -514,8 +519,10 @@ function onConnectCallback(element, remote){
},
);
particleAbility
.
disconnectAbility
(
connId
).
then
((
error
,
data
)
=>
{
console
.
log
(
'
particleAbilityTest result errCode :
'
+
error
.
code
+
"
data:
"
+
data
);
particleAbility
.
disconnectAbility
(
connId
).
then
((
data
)
=>
{
console
.
log
(
"
data:
"
+
data
);
}).
catch
((
error
)
=>
{
console
.
log
(
'
particleAbilityTest result errCode :
'
+
error
.
code
)
});
```
...
...
zh-cn/application-dev/reference/apis/js-apis-service-extension-ability.md
浏览文件 @
9e01c802
...
...
@@ -126,7 +126,7 @@ Extension生命周期回调,如果是connectAbility拉起的服务,会在onC
constructor
(
des
)
{
super
(
des
);
}
on
RemoteReques
t
(
code
,
data
,
reply
,
option
)
{
on
Connec
t
(
code
,
data
,
reply
,
option
)
{
}
}
class
ServiceExt
extends
ServiceExtension
{
...
...
zh-cn/application-dev/reference/apis/js-apis-wantAgent.md
浏览文件 @
9e01c802
...
...
@@ -29,7 +29,6 @@ getWantAgent(info: WantAgentInfo, callback: AsyncCallback\<WantAgent\>): void
```
js
import
WantAgent
from
'
@ohos.wantAgent
'
;
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
;
//getWantAgent回调
function
getWantAgentCallback
(
err
,
data
)
{
...
...
@@ -58,9 +57,9 @@ var wantAgentInfo = {
}
}
],
operationType
:
OperationType
.
START_ABILITIES
,
operationType
:
WantAgent
.
OperationType
.
START_ABILITIES
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
WantAgent
.
WantAgent
Flags
.
UPDATE_PRESENT_FLAG
]
}
WantAgent
.
getWantAgent
(
wantAgentInfo
,
getWantAgentCallback
)
...
...
@@ -92,7 +91,7 @@ getWantAgent(info: WantAgentInfo): Promise\<WantAgent\>
```
js
import
WantAgent
from
'
@ohos.wantAgent
'
;
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
;
//WantAgentInfo对象
var
wantAgentInfo
=
{
...
...
@@ -117,9 +116,9 @@ var wantAgentInfo = {
}
}
],
operationType
:
OperationType
.
START_ABILITIES
,
operationType
:
WantAgent
.
OperationType
.
START_ABILITIES
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
WantAgent
.
WantAgent
Flags
.
UPDATE_PRESENT_FLAG
]
}
WantAgent
.
getWantAgent
(
wantAgentInfo
).
then
((
data
)
=>
{
...
...
@@ -148,7 +147,7 @@ getBundleName(agent: WantAgent, callback: AsyncCallback\<string\>): void
```
js
import
WantAgent
from
'
@ohos.wantAgent
'
;
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
;
//wantAgent对象
var
wantAgent
;
...
...
@@ -185,9 +184,9 @@ var wantAgentInfo = {
}
}
],
operationType
:
OperationType
.
START_ABILITIES
,
operationType
:
WantAgent
.
OperationType
.
START_ABILITIES
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
WantAgent
.
WantAgent
Flags
.
UPDATE_PRESENT_FLAG
]
}
WantAgent
.
getWantAgent
(
wantAgentInfo
,
getWantAgentCallback
)
...
...
@@ -225,7 +224,7 @@ getBundleName(agent: WantAgent): Promise\<string\>
```
js
import
WantAgent
from
'
@ohos.wantAgent
'
;
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
;
//wantAgent对象
var
wantAgent
;
...
...
@@ -253,9 +252,9 @@ var wantAgentInfo = {
}
}
],
operationType
:
OperationType
.
START_ABILITIES
,
operationType
:
WantAgent
.
OperationType
.
START_ABILITIES
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
WantAgent
.
WantAgent
Flags
.
UPDATE_PRESENT_FLAG
]
}
WantAgent
.
getWantAgent
(
wantAgentInfo
).
then
((
data
)
=>
{
...
...
@@ -289,7 +288,7 @@ getUid(agent: WantAgent, callback: AsyncCallback\<number\>): void
```
js
import
WantAgent
from
'
@ohos.wantAgent
'
;
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
;
//wantAgent对象
var
wantAgent
;
...
...
@@ -326,9 +325,9 @@ var wantAgentInfo = {
}
}
],
operationType
:
OperationType
.
START_ABILITIES
,
operationType
:
WantAgent
.
OperationType
.
START_ABILITIES
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
WantAgent
.
WantAgent
Flags
.
UPDATE_PRESENT_FLAG
]
}
WantAgent
.
getWantAgent
(
wantAgentInfo
,
getWantAgentCallback
)
...
...
@@ -366,7 +365,7 @@ getUid(agent: WantAgent): Promise\<number\>
```
js
import
WantAgent
from
'
@ohos.wantAgent
'
;
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
;
//wantAgent对象
var
wantAgent
;
...
...
@@ -394,9 +393,9 @@ var wantAgentInfo = {
}
}
],
operationType
:
OperationType
.
START_ABILITIES
,
operationType
:
WantAgent
.
OperationType
.
START_ABILITIES
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
WantAgent
.
WantAgent
Flags
.
UPDATE_PRESENT_FLAG
]
}
WantAgent
.
getWantAgent
(
wantAgentInfo
).
then
((
data
)
=>
{
...
...
@@ -430,7 +429,7 @@ getWant(agent: WantAgent, callback: AsyncCallback\<Want\>): void
```
js
import
WantAgent
from
'
@ohos.wantAgent
'
;
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
;
//wantAgent对象
var
wantAgent
;
...
...
@@ -467,9 +466,9 @@ var wantAgentInfo = {
}
}
],
operationType
:
OperationType
.
START_ABILITIES
,
operationType
:
WantAgent
.
OperationType
.
START_ABILITIES
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
WantAgent
.
WantAgent
Flags
.
UPDATE_PRESENT_FLAG
]
}
WantAgent
.
getWantAgent
(
wantAgentInfo
,
getWantAgentCallback
)
...
...
@@ -507,7 +506,7 @@ getWant(agent: WantAgent): Promise\<Want\>
```
js
import
WantAgent
from
'
@ohos.wantAgent
'
;
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
;
//wantAgent对象
var
wantAgent
;
...
...
@@ -535,9 +534,9 @@ var wantAgentInfo = {
}
}
],
operationType
:
OperationType
.
START_ABILITIES
,
operationType
:
WantAgent
.
OperationType
.
START_ABILITIES
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
WantAgent
.
WantAgent
Flags
.
UPDATE_PRESENT_FLAG
]
}
WantAgent
.
getWantAgent
(
wantAgentInfo
).
then
((
data
)
=>
{
...
...
@@ -571,7 +570,7 @@ cancel(agent: WantAgent, callback: AsyncCallback\<void\>): void
```
js
import
WantAgent
from
'
@ohos.wantAgent
'
;
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
;
//wantAgent对象
var
wantAgent
;
...
...
@@ -608,9 +607,9 @@ var wantAgentInfo = {
}
}
],
operationType
:
OperationType
.
START_ABILITIES
,
operationType
:
WantAgent
.
OperationType
.
START_ABILITIES
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
WantAgent
.
WantAgent
Flags
.
UPDATE_PRESENT_FLAG
]
}
WantAgent
.
getWantAgent
(
wantAgentInfo
,
getWantAgentCallback
)
...
...
@@ -648,7 +647,7 @@ cancel(agent: WantAgent): Promise\<void\>
```
js
import
WantAgent
from
'
@ohos.wantAgent
'
;
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
;
//wantAgent对象
var
wantAgent
;
...
...
@@ -676,9 +675,9 @@ var wantAgentInfo = {
}
}
],
operationType
:
OperationType
.
START_ABILITIES
,
operationType
:
WantAgent
.
OperationType
.
START_ABILITIES
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
WantAgent
.
WantAgent
Flags
.
UPDATE_PRESENT_FLAG
]
}
WantAgent
.
getWantAgent
(
wantAgentInfo
).
then
((
data
)
=>
{
...
...
@@ -713,7 +712,7 @@ trigger(agent: WantAgent, triggerInfo: TriggerInfo, callback?: Callback\<Complet
```
js
import
WantAgent
from
'
@ohos.wantAgent
'
;
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
;
//wantAgent对象
var
wantAgent
;
...
...
@@ -750,9 +749,9 @@ var wantAgentInfo = {
}
}
],
operationType
:
OperationType
.
START_ABILITIES
,
operationType
:
WantAgent
.
OperationType
.
START_ABILITIES
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
WantAgent
.
WantAgent
Flags
.
UPDATE_PRESENT_FLAG
]
}
WantAgent
.
getWantAgent
(
wantAgentInfo
,
getWantAgentCallback
)
...
...
@@ -790,7 +789,7 @@ equal(agent: WantAgent, otherAgent: WantAgent, callback: AsyncCallback\<boolean\
```
js
import
WantAgent
from
'
@ohos.wantAgent
'
;
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
;
//wantAgent对象
var
wantAgent1
;
...
...
@@ -829,9 +828,9 @@ var wantAgentInfo = {
}
}
],
operationType
:
OperationType
.
START_ABILITIES
,
operationType
:
WantAgent
.
OperationType
.
START_ABILITIES
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
WantAgent
.
WantAgent
Flags
.
UPDATE_PRESENT_FLAG
]
}
WantAgent
.
getWantAgent
(
wantAgentInfo
,
getWantAgentCallback
)
...
...
@@ -870,7 +869,7 @@ equal(agent: WantAgent, otherAgent: WantAgent): Promise\<boolean\>
```
js
import
WantAgent
from
'
@ohos.wantAgent
'
;
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
;
//wantAgent对象
var
wantAgent1
;
...
...
@@ -899,9 +898,9 @@ var wantAgentInfo = {
}
}
],
operationType
:
OperationType
.
START_ABILITIES
,
operationType
:
WantAgent
.
OperationType
.
START_ABILITIES
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
WantAgent
.
WantAgent
Flags
.
UPDATE_PRESENT_FLAG
]
}
WantAgent
.
getWantAgent
(
wantAgentInfo
).
then
((
data
)
=>
{
...
...
@@ -961,7 +960,7 @@ var wantAgentInfo = {
}
}
],
operationType
:
OperationType
.
START_ABILITIES
,
operationType
:
WantAgent
.
OperationType
.
START_ABILITIES
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgent
.
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
}
...
...
@@ -1027,7 +1026,7 @@ var wantAgentInfo = {
}
}
],
operationType
:
OperationType
.
START_ABILITIES
,
operationType
:
WantAgent
.
OperationType
.
START_ABILITIES
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgent
.
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录