LifecycleService接口切换
FA模型接口 | Stage模型接口对应d.ts文件 | Stage模型对应接口 |
---|---|---|
onStart?(): void; | @ohos.app.ability.ServiceExtensionAbility.d.ts | onCreate(want: Want): void; |
onCommand?(want: Want, startId: number): void; | @ohos.app.ability.ServiceExtensionAbility.d.ts | onRequest(want: Want, startId: number): void; |
onStop?(): void; | @ohos.app.ability.ServiceExtensionAbility.d.ts | onDestroy(): void; |
onConnect?(want: Want): rpc.RemoteObject; | @ohos.app.ability.ServiceExtensionAbility.d.ts | onConnect(want: Want): rpc.RemoteObject; |
onDisconnect?(want: Want): void; | @ohos.app.ability.ServiceExtensionAbility.d.ts | onDisconnect(want: Want): void; |
onReconnect?(want: Want): void; | @ohos.app.ability.ServiceExtensionAbility.d.ts | onReconnect(want: Want): void; |
LifecycleService接口切换
FA模型接口 | Stage模型接口对应d.ts文件 | Stage模型对应接口 |
---|---|---|
update?(uri: string, valueBucket: rdb.ValuesBucket, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback<number>): void; | @ohos.application.DataShareExtensionAbility.d.ts | update?(uri: string, predicates: dataSharePredicates.DataSharePredicates, valueBucket: ValuesBucket, callback: AsyncCallback<number>): void |
query?(uri: string, columns: Array<string>, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback<ResultSet>): void; | @ohos.application.DataShareExtensionAbility.d.ts | query?(uri: string, predicates: dataSharePredicates.DataSharePredicates, columns: Array<string>, callback: AsyncCallback<Object>): void; |
delete?(uri: string, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback<number>): void; | @ohos.application.DataShareExtensionAbility.d.ts | delete?(uri: string, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback<number>): void; |
normalizeUri?(uri: string, callback: AsyncCallback<string>): void; | @ohos.application.DataShareExtensionAbility.d.ts | normalizeUri?(uri: string, callback: AsyncCallback<string>): void; |
batchInsert?(uri: string, valueBuckets: Array<rdb.ValuesBucket>, callback: AsyncCallback<number>): void; | @ohos.application.DataShareExtensionAbility.d.ts | batchInsert?(uri: string, valueBuckets: Array<ValuesBucket>, callback: AsyncCallback<number>): void; |
denormalizeUri?(uri: string, callback: AsyncCallback<string>): void; | @ohos.application.DataShareExtensionAbility.d.ts | denormalizeUri?(uri: string, callback: AsyncCallback<string>): void; |
insert?(uri: string, valueBucket: rdb.ValuesBucket, callback: AsyncCallback<number>): void; | @ohos.application.DataShareExtensionAbility.d.ts | insert?(uri: string, valueBucket: ValuesBucket, callback: AsyncCallback<number>): void; |
openFile?(uri: string, mode: string, callback: AsyncCallback<number>): void; | Stage模型无对应接口 | Stage模型不支持uri跨进程访问,建议通过 want携带fd和文件信息 (data-share-via-want.md)进行跨进程文件访问 |
getFileTypes?(uri: string, mimeTypeFilter: string, callback: AsyncCallback<Array<string>>): void; | Stage模型无对应接口 | Stage模型不支持uri跨进程访问,建议通过 want携带fd和文件信息 (data-share-via-want.md)进行跨进程文件访问 |
onInitialized?(info: AbilityInfo): void; | @ohos.application.DataShareExtensionAbility.d.ts | onCreate?(want: Want, callback: AsyncCallback<void>): void; |
getType?(uri: string, callback: AsyncCallback<string>): void; | Stage模型无对应接口 | Stage模型不支持uri跨进程访问,建议通过 want携带fd和文件信息 (data-share-via-want.md)进行跨进程文件访问 |
executeBatch?(ops: Array<DataAbilityOperation>, callback: AsyncCallback<Array<DataAbilityResult>>): void; | Stage模型无对应接口 | 暂时未提供对应接口 |
call?(method: string, arg: string, extras: PacMap, callback: AsyncCallback<PacMap>): void; | Stage模型无对应接口 | 暂时未提供对应接口 |
为了能让大家更好的学习鸿蒙(HarmonyOS NEXT)开发技术,这边特意整理了《鸿蒙开发学习手册》(共计890页),希望对大家有所帮助:https://qr21.cn/FV7h05
《鸿蒙开发学习手册》:
如何快速入门:https://qr21.cn/FV7h05
- 基本概念
- 构建第一个ArkTS应用
- ……
开发基础知识:https://qr21.cn/FV7h05
- 应用基础知识
- 配置文件
- 应用数据管理
- 应用安全管理
- 应用隐私保护
- 三方应用调用管控机制
- 资源分类与访问
- 学习ArkTS语言
- ……
基于ArkTS 开发:https://qr21.cn/FV7h05
- Ability开发
- UI开发
- 公共事件与通知
- 窗口管理
- 媒体
- 安全
- 网络与链接
- 电话服务
- 数据管理
- 后台任务(Background Task)管理
- 设备管理
- 设备使用信息统计
- DFX
- 国际化开发
- 折叠屏系列
- ……
鸿蒙开发面试真题(含参考答案):https://qr18.cn/F781PH
鸿蒙开发面试大盘集篇(共计319页):https://qr18.cn/F781PH
1.项目开发必备面试题
2.性能优化方向
3.架构方向
4.鸿蒙开发系统底层方向
5.鸿蒙音视频开发方向
6.鸿蒙车载开发方向
7.鸿蒙南向开发方向