0
  • 聊天消息
  • 系统消息
  • 评论与回复
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
会员中心
创作中心

完善资料让更多小伙伴认识你,还能领取20积分哦,立即完善>

3天内不再提示

鸿蒙开发接口Ability框架:【AbilityDelegator】

jf_46214456 来源:jf_46214456 作者:jf_46214456 2024-05-16 16:48 次阅读

AbilityDelegator

AbilityDelegator提供添加用于监视指定能力的生命周期状态更改的AbilityMonitor对象的能力,包括对AbilityMonitor实例的添加、删除、等待ability到达OnCreate生命周期、设置等待时间等、获取指定ability的生命周期状态、获取当前应用顶部ability、启动指定ability等。

说明:
开发前请熟悉鸿蒙开发指导文档:[gitee.com/li-shizhen-skin/harmony-os/blob/master/README.md]
本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。

使用说明

通过AbilityDelegatorRegistry中getAbilityDelegator方法获取。

import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'

var abilityDelegator;

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();

AbilityDelegator

addAbilityMonitor9+

addAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback): void

添加AbilityMonitor实例(callback形式)

**系统能力:**SystemCapability.Ability.AbilityRuntime.Core

参数

参数名类型必填说明说明
monitor[AbilityMonitor][AbilityMonitor]实例
callbackAsyncCallback表示指定的回调方法

示例:

var abilityDelegator;

function onAbilityCreateCallback(data) {
    console.info("onAbilityCreateCallback");
}

var monitor = {
    abilityName: "abilityname",
    onAbilityCreate: onAbilityCreateCallback
}

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.addAbilityMonitor(monitor, (err : any) = > {
    console.info("addAbilityMonitor callback");
});

addAbilityMonitor9+

addAbilityMonitor(monitor: AbilityMonitor): Promise

添加AbilityMonitor实例(promise形式)

系统能力: SystemCapability.Ability.AbilityRuntime.Core

参数:

参数名类型必填说明
monitor[AbilityMonitor][AbilityMonitor]实例

返回值:

类型说明
Promise以Promise形式返回。

示例:

var abilityDelegator;

function onAbilityCreateCallback(data) {
    console.info("onAbilityCreateCallback");
}

var monitor = {
    abilityName: "abilityname",
    onAbilityCreate: onAbilityCreateCallback
}

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.addAbilityMonitor(monitor).then(() = > {
    console.info("addAbilityMonitor promise");
});

removeAbilityMonitor9+

removeAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback): void

删除已经添加的AbilityMonitor实例(callback形式)

系统能力: SystemCapability.Ability.AbilityRuntime.Core

参数:

参数名类型必填说明
monitor[AbilityMonitor][AbilityMonitor]实例
callbackAsyncCallback表示指定的回调方法

示例:

var abilityDelegator;

function onAbilityCreateCallback(data) {
    console.info("onAbilityCreateCallback");
}

var monitor = {
    abilityName: "abilityname",
    onAbilityCreate: onAbilityCreateCallback
}

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.removeAbilityMonitor(monitor, (err : any) = > {
    console.info("removeAbilityMonitor callback");
});

removeAbilityMonitor9+

removeAbilityMonitor(monitor: AbilityMonitor): Promise

删除已经添加的AbilityMonitor实例(promise形式)

系统能力: SystemCapability.Ability.AbilityRuntime.Core

参数:

名称类型必填说明
monitor[AbilityMonitor][AbilityMonitor]实例

返回值:

类型说明
Promise以Promise形式返回。
  • 示例
var abilityDelegator;

function onAbilityCreateCallback(data) {
    console.info("onAbilityCreateCallback");
}

var monitor = {
    abilityName: "abilityname",
    onAbilityCreate: onAbilityCreateCallback
}

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.removeAbilityMonitor(monitor).then(() = > {
    console.info("removeAbilityMonitor promise");
});

waitAbilityMonitor9+

waitAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback): void

等待与AbilityMonitor实例匹配的ability到达OnCreate生命周期,并返回ability实例(callback形式)

系统能力: SystemCapability.Ability.AbilityRuntime.Core

参数:

参数名类型必填说明
monitor[AbilityMonitor][AbilityMonitor]实例
callbackAsyncCallback[Ability]表示指定的回调方法

示例:

var abilityDelegator;

function onAbilityCreateCallback(data) {
    console.info("onAbilityCreateCallback");
}

var monitor = {
    abilityName: "abilityname",
    onAbilityCreate: onAbilityCreateCallback
}

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.waitAbilityMonitor(monitor, (err : any, data : any) = > {
    console.info("waitAbilityMonitor callback");
});

waitAbilityMonitor9+

waitAbilityMonitor(monitor: AbilityMonitor, timeout: number, callback: AsyncCallback): void

设置等待时间,等待与AbilityMonitor实例匹配的ability到达OnCreate生命周期,并返回ability实例(callback形式)

系统能力: SystemCapability.Ability.AbilityRuntime.Core

参数:

参数名类型必填说明
monitor[AbilityMonitor][AbilityMonitor]实例
timeoutnumber最大等待时间,单位毫秒(ms)
callbackAsyncCallback[Ability]表示指定的回调方法

示例:

var abilityDelegator;
var timeout = 100;

function onAbilityCreateCallback(data) {
    console.info("onAbilityCreateCallback");
}

var monitor = {
    abilityName: "abilityname",
    onAbilityCreate: onAbilityCreateCallback
}

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.waitAbilityMonitor(monitor, timeout, (err : any, data : any) = > {
    console.info("waitAbilityMonitor callback");
});

waitAbilityMonitor9+

waitAbilityMonitor(monitor: AbilityMonitor, timeout?: number): Promise

设置等待时间,等待与AbilityMonitor实例匹配的ability到达OnCreate生命周期,并返回ability实例(promise形式)

系统能力: SystemCapability.Ability.AbilityRuntime.Core

参数:

参数名类型必填说明
monitor[AbilityMonitor][AbilityMonitor]实例
timeoutnumber最大等待时间,单位毫秒(ms)

返回值:

类型说明
Promise[Ability]以Promise形式返回Ability。

示例:

var abilityDelegator;

function onAbilityCreateCallback(data) {
    console.info("onAbilityCreateCallback");
}

var monitor = {
    abilityName: "abilityname",
    onAbilityCreate: onAbilityCreateCallback
}

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.waitAbilityMonitor(monitor).then((data : any) = > {
    console.info("waitAbilityMonitor promise");
});

getAppContext9+

getAppContext(): Context

获取应用Context

系统能力: SystemCapability.Ability.AbilityRuntime.Core

返回值:

类型说明
[Context]应用[Context]。

示例:

var abilityDelegator;

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
var context = abilityDelegator.getAppContext();

getAbilityState9+

getAbilityState(ability: Ability): number

获取指定ability的生命周期状态

系统能力: SystemCapability.Ability.AbilityRuntime.Core

参数:

参数名类型必填说明
ability[Ability]指定Ability对象

返回值:

类型说明
number指定ability的生命周期状态。状态枚举值使用[AbilityLifecycleState]。

示例:

var abilityDelegator;
var ability;

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.getCurrentTopAbility((err : any, data : any) = > {
    console.info("getCurrentTopAbility callback");
    ability = data;
    var state = abilityDelegator.getAbilityState(ability);
    console.info("getAbilityState" + state);
});

getCurrentTopAbility9+

getCurrentTopAbility(callback: AsyncCallback): void

获取当前应用顶部ability(callback形式)

系统能力: SystemCapability.Ability.AbilityRuntime.Core

参数:

参数名类型必填说明
callbackAsyncCallback[Ability]表示指定的回调方法

示例:

var abilityDelegator;
var ability;

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.getCurrentTopAbility((err : any, data : any) = > {
    console.info("getCurrentTopAbility callback");
    ability = data;
});

getCurrentTopAbility9+

getCurrentTopAbility(): Promise

获取当前应用顶部ability(promise形式)

系统能力: SystemCapability.Ability.AbilityRuntime.Core

返回值:

类型说明
Promise[Ability]以Promise形式返回当前应用顶部ability。

示例:

var abilityDelegator;
var ability;

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.getCurrentTopAbility().then((data : any) = > {
    console.info("getCurrentTopAbility promise");
    ability = data;
});

startAbility9+

startAbility(want: Want, callback: AsyncCallback): void

启动指定ability(callback形式)

系统能力: SystemCapability.Ability.AbilityRuntime.Core

参数:

参数名类型必填说明
want[Want]启动Ability参数
callbackAsyncCallback表示指定的回调方法

示例:

var abilityDelegator;
var want = {
    bundleName: "bundleName",
    abilityName: "abilityName"
};

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.startAbility(want, (err : any, data : any) = > {
    console.info("startAbility callback");
});

startAbility9+

startAbility(want: Want): Promise

启动指定ability(promise形式)

系统能力: SystemCapability.Ability.AbilityRuntime.Core

参数:

参数名类型必填说明
want[Want]启动Ability参数

返回值:

类型说明
Promise以Promise形式返回。

示例:

var abilityDelegator;
var want = {
    bundleName: "bundleName",
    abilityName: "abilityName"
};

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.startAbility(want).then((data: any) = > {
    console.info("startAbility promise");
});

doAbilityForeground9+

doAbilityForeground(ability: Ability, callback: AsyncCallback): void

调度指定ability生命周期状态到Foreground状态(callback形式)

系统能力: SystemCapability.Ability.AbilityRuntime.Core

参数:

参数名类型必填说明
abilityAbility指定Ability对象
callbackAsyncCallback表示指定的回调方法 - true:成功 - false:失败

示例:

var abilityDelegator;
var ability;

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.getCurrentTopAbility((err : any, data : any) = > {
    console.info("getCurrentTopAbility callback");
    ability = data;
    abilityDelegator.doAbilityForeground(ability, (err : any, data : any) = > {
        console.info("doAbilityForeground callback");
    });
});

doAbilityForeground9+

doAbilityForeground(ability: Ability): Promise

调度指定ability生命周期状态到Foreground状态(promise形式)

系统能力: SystemCapability.Ability.AbilityRuntime.Core

参数:

参数名类型必填说明
abilityAbility指定Ability对象

返回值:

类型说明
Promise以Promise形式返回执行结果。 - true:成功 - false:失败

示例:

var abilityDelegator;
var ability;

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.getCurrentTopAbility((err : any, data : any) = > {
    console.info("getCurrentTopAbility callback");
    ability = data;
    abilityDelegator.doAbilityForeground(ability).then((data : any) = > {
        console.info("doAbilityForeground promise");
    });
});

doAbilityBackground9+

doAbilityBackground(ability: Ability, callback: AsyncCallback): void

调度指定ability生命周期状态到Background状态(callback形式)

系统能力: SystemCapability.Ability.AbilityRuntime.Core

参数:

参数名类型必填说明
abilityAbility指定Ability对象
callbackAsyncCallback表示指定的回调方法 - true:成功 - false:失败

示例:

var abilityDelegator;
var ability;

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.getCurrentTopAbility((err : any, data : any) = > {
    console.info("getCurrentTopAbility callback");
    ability = data;
    abilityDelegator.doAbilityBackground(ability, (err : any, data : any) = > {
        console.info("doAbilityBackground callback");
    });
});

doAbilityBackground9+

doAbilityBackground(ability: Ability): Promise

调度指定ability生命周期状态到Background状态(promise形式)

系统能力: SystemCapability.Ability.AbilityRuntime.Core

参数:

参数名类型必填说明
abilityAbility指定Ability对象

返回值:

类型说明
Promise以Promise形式返回执行结果。 - true:成功 - false:失败

示例:

var abilityDelegator;
var ability;

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.getCurrentTopAbility((err : any, data : any) = > {
    console.info("getCurrentTopAbility callback");
    ability = data;
    abilityDelegator.doAbilityBackground(ability).then((data : any) = > {
        console.info("doAbilityBackground promise");
    });
});

print

print(msg: string, callback: AsyncCallback): void

打印日志信息到单元测试终端控制台(callback形式)

系统能力: SystemCapability.Ability.AbilityRuntime.Core

参数:

参数名类型必填说明
msgstring日志字符串
callbackAsyncCallback表示指定的回调方法

示例:

var abilityDelegator;
var msg = "msg";

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.print(msg, (err : any) = > {
    console.info("print callback");
});

print

print(msg: string): Promise

打印日志信息到单元测试终端控制台(promise形式)

系统能力: SystemCapability.Ability.AbilityRuntime.Core

参数:

参数名类型必填说明
msgstring日志字符串

返回值:

类型说明
Promise以Promise形式返回。

示例:

var abilityDelegator;
var msg = "msg";

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.print(msg).then(() = > {
    console.info("print promise");
});

executeShellCommand

executeShellCommand(cmd: string, callback: AsyncCallback): void

执行指定的shell命令(callback形式)

系统能力: SystemCapability.Ability.AbilityRuntime.Core

参数:

参数名类型必填说明
cmdstringshell命令字符串
callbackAsyncCallback[ShellCmdResult]表示指定的回调方法

示例:

var abilityDelegator;
var cmd = "cmd";

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.executeShellCommand(cmd, (err : any, data : any) = > {
    console.info("executeShellCommand callback");
});

executeShellCommand

executeShellCommand(cmd: string, timeoutSecs: number, callback: AsyncCallback): void

指定超时时间,并执行指定的shell命令(callback形式)

系统能力: SystemCapability.Ability.AbilityRuntime.Core

参数:

参数名类型必填说明
cmdstringshell命令字符串
timeoutSecsnumber设定命令超时时间,单位秒(s)
callbackAsyncCallback[ShellCmdResult]表示指定的回调方法

示例:

var abilityDelegator;
var cmd = "cmd";
var timeout = 100;

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.executeShellCommand(cmd, timeout, (err : any, data : any) = > {
    console.info("executeShellCommand callback");
});

executeShellCommand

executeShellCommand(cmd: string, timeoutSecs?: number): Promise

指定超时时间,并执行指定的shell命令(promise形式)

系统能力: SystemCapability.Ability.AbilityRuntime.Core

参数:

参数名类型必填说明
cmdstringshell命令字符串
timeoutSecsnumber设定命令超时时间,单位秒(s)

返回值:

类型说明
Promise[ShellCmdResult]以Promise形式返回Shell命令执行结果[ShellCmdResult]对象。

示例:

var abilityDelegator;
var cmd = "cmd";
var timeout = 100;

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.executeShellCommand(cmd, timeout).then((data : any) = > {
    console.info("executeShellCommand promise");
});

finishTest9+

finishTest(msg: string, code: number, callback: AsyncCallback): void

结束测试并打印日志信息到单元测试终端控制台(callback形式)

系统能力: SystemCapability.Ability.AbilityRuntime.Core

参数:

参数名类型必填说明
msgstring日志字符串
codenumber日志码
callbackAsyncCallback表示指定的回调方法

示例:

var abilityDelegator;
var msg = "msg";

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.finishTest(msg, 0, (err : any) = > {
    console.info("finishTest callback");
});

finishTest9+

finishTest(msg: string, code: number): Promise

结束测试并打印日志信息到单元测试终端控制台(promise形式)

系统能力: SystemCapability.Ability.AbilityRuntime.Core

参数:

参数名类型必填说明
msgstring日志字符串
codenumber日志码

返回值:

类型说明
Promise以Promise形式返回。

搜狗高速浏览器截图20240326151450.png

示例:

var abilityDelegator;
var msg = "msg";

abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.finishTest(msg, 0).then(() = > {
    console.info("finishTest promise");
});

审核编辑 黄宇

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
  • 接口
    +关注

    关注

    33

    文章

    8414

    浏览量

    150652
  • 框架
    +关注

    关注

    0

    文章

    397

    浏览量

    17385
  • 鸿蒙
    +关注

    关注

    57

    文章

    2301

    浏览量

    42662
收藏 人收藏

    评论

    相关推荐

    鸿蒙开发接口Ability框架:【@ohos.application.Ability (Ability)】

    Ability模块提供对Ability生命周期、上下文环境等调用管理的能力,包括Ability创建、销毁、转储客户端信息等。
    的头像 发表于 04-30 17:42 2167次阅读
    <b class='flag-5'>鸿蒙</b><b class='flag-5'>开发</b><b class='flag-5'>接口</b><b class='flag-5'>Ability</b><b class='flag-5'>框架</b>:【@ohos.application.<b class='flag-5'>Ability</b> (<b class='flag-5'>Ability</b>)】

    鸿蒙开发接口Ability框架:【@ohos.ability.featureAbility (FeatureAbility模块)】

    FeatureAbility模块提供带有UI设计与用户交互的能力,包括启动新的ability、获取dataAbilityHelper、设置此Page Ability、获取当前Ability对应的窗口,连接服务等。
    的头像 发表于 05-06 16:31 881次阅读
    <b class='flag-5'>鸿蒙</b><b class='flag-5'>开发</b><b class='flag-5'>接口</b><b class='flag-5'>Ability</b><b class='flag-5'>框架</b>:【@ohos.<b class='flag-5'>ability</b>.featureAbility (FeatureAbility模块)】

    鸿蒙开发接口Ability框架:【@ohos.application.missionManager (missionManager)】

    表示Ability对应任务信息的枚举。
    的头像 发表于 05-08 09:19 837次阅读
    <b class='flag-5'>鸿蒙</b><b class='flag-5'>开发</b><b class='flag-5'>接口</b><b class='flag-5'>Ability</b><b class='flag-5'>框架</b>:【@ohos.application.missionManager (missionManager)】

    鸿蒙开发接口Ability框架:【@ohos.ability.particleAbility (particleAbility模块)】

    particleAbility模块提供了Service类型Ability的能力,包括启动、停止指定的particleAbility,获取dataAbilityHelper,连接、断开当前Ability与指定ServiceAbility等。
    的头像 发表于 05-09 10:21 653次阅读
    <b class='flag-5'>鸿蒙</b><b class='flag-5'>开发</b><b class='flag-5'>接口</b><b class='flag-5'>Ability</b><b class='flag-5'>框架</b>:【@ohos.<b class='flag-5'>ability</b>.particleAbility (particleAbility模块)】

    鸿蒙开发接口Ability框架:【(uriPermissionManager)】

    本模块首批接口从API version 9 开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
    的头像 发表于 05-10 17:46 709次阅读
    <b class='flag-5'>鸿蒙</b><b class='flag-5'>开发</b><b class='flag-5'>接口</b><b class='flag-5'>Ability</b><b class='flag-5'>框架</b>:【(uriPermissionManager)】

    鸿蒙开发接口Ability框架:【 (Context模块)】

    Context模块提供了ability或application的上下文的能力,包括允许访问特定于应用程序的资源、请求和验证权限等。
    的头像 发表于 05-13 16:04 638次阅读
    <b class='flag-5'>鸿蒙</b><b class='flag-5'>开发</b><b class='flag-5'>接口</b><b class='flag-5'>Ability</b><b class='flag-5'>框架</b>:【 (Context模块)】

    鸿蒙开发接口Ability框架:【(AbilityContext)】

    AbilityContext是Ability的上下文环境,继承自Context。
    的头像 发表于 05-13 09:26 917次阅读
    <b class='flag-5'>鸿蒙</b><b class='flag-5'>开发</b><b class='flag-5'>接口</b><b class='flag-5'>Ability</b><b class='flag-5'>框架</b>:【(AbilityContext)】

    鸿蒙开发接口Ability框架:【(AbilityDelegator)】

    AbilityDelegator提供添加用于监视指定能力的生命周期状态更改的AbilityMonitor对象的能力,包括对AbilityMonitor实例的添加、删除、等待ability到达
    的头像 发表于 05-13 17:58 897次阅读
    <b class='flag-5'>鸿蒙</b><b class='flag-5'>开发</b><b class='flag-5'>接口</b><b class='flag-5'>Ability</b><b class='flag-5'>框架</b>:【(<b class='flag-5'>AbilityDelegator</b>)】

    鸿蒙开发接口Ability框架:【AbilityRunningInfo】

    AbilityRunningInfo模块提供对Ability运行的相关信息和状态进行设置和查询的能力。
    的头像 发表于 05-14 16:02 732次阅读
    <b class='flag-5'>鸿蒙</b><b class='flag-5'>开发</b><b class='flag-5'>接口</b><b class='flag-5'>Ability</b><b class='flag-5'>框架</b>:【AbilityRunningInfo】

    鸿蒙Ability开发-Stage模型下Ability的创建和使用

    ); hilog.info(ENTRY_ABILITY_DOMAIN, TAG, \'%{public}s\', \'Ability onBackground\'); } } 本文内容是鸿蒙
    发表于 01-08 15:34

    鸿蒙开发接口Ability框架:【AbilityDelegatorArgs】

    AbilityDelegatorArgs模块提供在应用程序启动期间,用于存储已注册的AbilityDelegator和AbilityDelegatorArgs对象的全局寄存器的能力。
    的头像 发表于 05-14 09:49 243次阅读
    <b class='flag-5'>鸿蒙</b><b class='flag-5'>开发</b><b class='flag-5'>接口</b><b class='flag-5'>Ability</b><b class='flag-5'>框架</b>:【AbilityDelegatorArgs】

    鸿蒙开发接口Ability框架:【ApplicationContext】

    ApplicationContext模块提供开发者应用级别的的上下文的能力,包括提供注册及取消注册应用内组件生命周期的监听接口
    的头像 发表于 05-16 11:51 555次阅读
    <b class='flag-5'>鸿蒙</b><b class='flag-5'>开发</b><b class='flag-5'>接口</b><b class='flag-5'>Ability</b><b class='flag-5'>框架</b>:【ApplicationContext】

    鸿蒙开发接口Ability框架:【AbilityRunningInfo】

    AbilityRunningInfo模块提供对Ability运行的相关信息和状态进行设置和查询的能力。
    的头像 发表于 05-17 17:12 277次阅读
    <b class='flag-5'>鸿蒙</b><b class='flag-5'>开发</b><b class='flag-5'>接口</b><b class='flag-5'>Ability</b><b class='flag-5'>框架</b>:【AbilityRunningInfo】

    鸿蒙Ability Kit(程序框架服务)【Ability内页面间的跳转】

    基于Stage模型下的Ability开发,实现Ability内页面间的跳转和数据传递。
    的头像 发表于 06-03 20:43 235次阅读
    <b class='flag-5'>鸿蒙</b><b class='flag-5'>Ability</b> Kit(程序<b class='flag-5'>框架</b>服务)【<b class='flag-5'>Ability</b>内页面间的跳转】

    鸿蒙Ability Kit(程序框架服务)【Ability与ServiceExtensionAbility通信】

    本示例展示通过[IDL的方式]和 [@ohos.rpc] 等接口实现了Ability与ServiceExtensionAbility之间的通信。
    的头像 发表于 06-05 09:28 410次阅读
    <b class='flag-5'>鸿蒙</b><b class='flag-5'>Ability</b> Kit(程序<b class='flag-5'>框架</b>服务)【<b class='flag-5'>Ability</b>与ServiceExtensionAbility通信】