mirror of
https://gitee.com/openharmony/appexecfwk_standard
synced 2025-03-04 19:18:01 +00:00
queryAbilityByWant readme
Signed-off-by: SoftSquirrel <1690027871@qq.com>
This commit is contained in:
parent
c843466fd0
commit
dffbe0f279
31
README_zh.md
31
README_zh.md
@ -632,17 +632,9 @@ function OnReceiveEvent(err, data) {
|
||||
|
||||
```
|
||||
bundle.queryAbilityByWant({
|
||||
want: {
|
||||
action: "action.system.home",
|
||||
entities: ["entity.system.home"],
|
||||
elementName: {
|
||||
deviceId: "0",
|
||||
bundleName: "com.example.myapplicationInstall",
|
||||
abilityName: "com.example.myapplication.MainAbility",
|
||||
},
|
||||
}
|
||||
}, 1, 0,
|
||||
}).then((data) => {
|
||||
bundleName: "com.example.myapplicationInstall",
|
||||
abilityName: "com.example.myapplication.MainAbility",
|
||||
}, 0x00000002 | 0x00000004 | 0x00000020, 0).then((data) => {
|
||||
console.info("name:" + data.name);
|
||||
console.info("label:" + data.label);
|
||||
console.info("description:" + data.description);
|
||||
@ -746,19 +738,10 @@ bundle.queryAbilityByWant({
|
||||
* 示例
|
||||
|
||||
```
|
||||
bundle.queryAbilityByWant(
|
||||
{
|
||||
want: {
|
||||
action: "action.system.home",
|
||||
entities: ["entity.system.home"],
|
||||
elementName: {
|
||||
deviceId: "0",
|
||||
bundleName: "com.example.myapplicationInstall",
|
||||
abilityName: "com.example.myapplication.MainAbility",
|
||||
},
|
||||
}
|
||||
}, 1, 0,
|
||||
}, OnReceiveEvent);
|
||||
bundle.queryAbilityByWant({
|
||||
bundleName: "com.example.myapplicationInstall",
|
||||
abilityName: "com.example.myapplication.MainAbility",
|
||||
}, 0x00000002 | 0x00000004 | 0x00000020, 0, OnReceiveEvent);
|
||||
|
||||
function OnReceiveEvent(err, data) {
|
||||
console.info("name:" + data.name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user