harmony 鸿蒙particleAbility接口切换

  • 2022-12-13
  • 浏览 (570)

particleAbility接口切换

FA模型接口 Stage模型接口对应d.ts文件 Stage模型对应接口
startAbility(parameter: StartAbilityParameter, callback: AsyncCallback<number>): void;
startAbility(parameter: StartAbilityParameter): Promise<number>;
application\ServiceExtensionContext.d.ts startAbility(want: Want, callback: AsyncCallback<void>): void;
startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>): void;
startAbility(want: Want, options?: StartOptions): Promise<void>;
startServiceExtensionAbility(want: Want, callback: AsyncCallback<void>): void;
startServiceExtensionAbility(want: Want): Promise<void>;
terminateSelf(callback: AsyncCallback<void>): void;
terminateSelf(): Promise<void>;
application\ServiceExtensionContext.d.ts terminateSelf(callback: AsyncCallback<void>): void;
terminateSelf(): Promise<void>;
connectAbility(request: Want, options:ConnectOptions ): number; application\ServiceExtensionContext.d.ts connectAbility(want: Want, options: ConnectOptions): number;
connectServiceExtensionAbility(want: Want, options: ConnectOptions): number;
disconnectAbility(connection: number, callback:AsyncCallback<void>): void;
disconnectAbility(connection: number): Promise<void>;
application\ServiceExtensionContext.d.ts disconnectAbility(connection: number, callback:AsyncCallback<void>): void; 
disconnectAbility(connection: number): Promise<void>;
disconnectServiceExtensionAbility(connection: number, callback: AsyncCallback<void>): void;
disconnectServiceExtensionAbility(connection: number): Promise<void>;
acquireDataAbilityHelper(uri: string): DataAbilityHelper; \@ohos.data.dataShare.d.ts
[\@ohos.data.fileAccess.d.ts
createDataShareHelper(context: Context, uri: string, callback: AsyncCallback<DataShareHelper>): void;
createDataShareHelper(context: Context, uri: string): Promise<DataShareHelper>;
createFileAccessHelper(context: Context): FileAccessHelper;
createFileAccessHelper(context: Context, wants: Array<Want>): FileAccessHelper;
startBackgroundRunning(id: number, request: NotificationRequest, callback: AsyncCallback<void>): void;
startBackgroundRunning(id: number, request: NotificationRequest): Promise<void>;
\@ohos.resourceschedule.backgroundTaskManager.d.ts startBackgroundRunning(context: Context, bgMode: BackgroundMode, wantAgent: WantAgent, callback: AsyncCallback): void;
startBackgroundRunning(context: Context, bgMode: BackgroundMode, wantAgent: WantAgent): Promise<void>;
cancelBackgroundRunning(callback: AsyncCallback<void>): void;
cancelBackgroundRunning(): Promise<void>;
\@ohos.resourceschedule.backgroundTaskManager.d.ts stopBackgroundRunning(context: Context, callback: AsyncCallback): void;
stopBackgroundRunning(context: Context): Promise<void>;

你可能感兴趣的鸿蒙文章

harmony 鸿蒙应用模型

harmony 鸿蒙使用显式Want启动应用组件

harmony 鸿蒙使用隐式Want打开网址

harmony 鸿蒙AbilityStage组件容器

harmony 鸿蒙访问DataAbility

harmony 鸿蒙FA模型访问Stage模型DataShareExtensionAbility

harmony 鸿蒙AccessibilityExtensionAbility

harmony 鸿蒙常见action与entities

harmony 鸿蒙API切换概述

harmony 鸿蒙app和deviceConfig的切换

0  赞