提交 0a46fcc7 编写于 作者: D donglin

other file

Signed-off-by: Ndonglin <donglin9@huawei.com>
Change-Id: I443980979b6e49977d4383c498606c923b4ac168
上级 9914c7a2
...@@ -363,7 +363,7 @@ startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncC ...@@ -363,7 +363,7 @@ startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncC
启动一个Ability并在该Ability帐号销毁时返回执行结果(callback形式)。 启动一个Ability并在该Ability帐号销毁时返回执行结果(callback形式)。
**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -420,7 +420,7 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options: StartOp ...@@ -420,7 +420,7 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options: StartOp
启动一个Ability并在该Ability帐号销毁时返回执行结果(callback形式)。 启动一个Ability并在该Ability帐号销毁时返回执行结果(callback形式)。
**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -481,7 +481,7 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options?: StartO ...@@ -481,7 +481,7 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options?: StartO
启动一个Ability并在该Ability帐号销毁时返回执行结果(promise形式)。 启动一个Ability并在该Ability帐号销毁时返回执行结果(promise形式)。
**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -646,7 +646,7 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: ...@@ -646,7 +646,7 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback:
启动一个新的ServiceExtensionAbility(callback形式)。 启动一个新的ServiceExtensionAbility(callback形式)。
**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -701,7 +701,7 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\ ...@@ -701,7 +701,7 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\
启动一个新的ServiceExtensionAbility(Promise形式)。 启动一个新的ServiceExtensionAbility(Promise形式)。
**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -782,8 +782,14 @@ stopServiceExtensionAbility(want: Want, callback: AsyncCallback\<void>): void; ...@@ -782,8 +782,14 @@ stopServiceExtensionAbility(want: Want, callback: AsyncCallback\<void>): void;
}; };
try { try {
this.context.startAbility(want, (error) => {
if (error.code != 0) {
console.log("start ability fail, err: " + JSON.stringify(err));
}
})
this.context.stopServiceExtensionAbility(want, (error) => { this.context.stopServiceExtensionAbility(want, (error) => {
if (error.code) { if (error.code != 0) {
// 处理业务逻辑错误 // 处理业务逻辑错误
console.log('stopServiceExtensionAbility failed, error.code: ' + JSON.stringify(error.code) + console.log('stopServiceExtensionAbility failed, error.code: ' + JSON.stringify(error.code) +
' error.message: ' + JSON.stringify(error.message)); ' error.message: ' + JSON.stringify(error.message));
...@@ -832,6 +838,12 @@ stopServiceExtensionAbility(want: Want): Promise\<void>; ...@@ -832,6 +838,12 @@ stopServiceExtensionAbility(want: Want): Promise\<void>;
}; };
try { try {
this.context.startAbility(want, (error) => {
if (error.code != 0) {
console.log("start ability fail, err: " + JSON.stringify(err));
}
})
this.context.stopServiceExtensionAbility(want) this.context.stopServiceExtensionAbility(want)
.then((data) => { .then((data) => {
// 执行正常业务 // 执行正常业务
...@@ -855,7 +867,7 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: ...@@ -855,7 +867,7 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback:
使用帐户停止同一应用程序内的服务(callback形式)。 使用帐户停止同一应用程序内的服务(callback形式)。
**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -887,6 +899,12 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: ...@@ -887,6 +899,12 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback:
var accountId = 100; var accountId = 100;
try { try {
this.context.startAbilityWithAccount(want, accountId, (error) => {
if (error.code != 0) {
console.log("start ability fail, err: " + JSON.stringify(err));
}
})
this.context.stopServiceExtensionAbilityWithAccount(want, accountId, (error) => { this.context.stopServiceExtensionAbilityWithAccount(want, accountId, (error) => {
if (error.code) { if (error.code) {
// 处理业务逻辑错误 // 处理业务逻辑错误
...@@ -910,7 +928,7 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\< ...@@ -910,7 +928,7 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\<
使用帐户停止同一应用程序内的服务(Promise形式)。 使用帐户停止同一应用程序内的服务(Promise形式)。
**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -941,6 +959,12 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\< ...@@ -941,6 +959,12 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\<
var accountId = 100; var accountId = 100;
try { try {
this.context.startAbilityWithAccount(want, accountId, (error) => {
if (error.code != 0) {
console.log("start ability fail, err: " + JSON.stringify(err));
}
})
this.context.stopServiceExtensionAbilityWithAccount(want, accountId) this.context.stopServiceExtensionAbilityWithAccount(want, accountId)
.then((data) => { .then((data) => {
// 执行正常业务 // 执行正常业务
...@@ -1206,7 +1230,7 @@ connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options ...@@ -1206,7 +1230,7 @@ connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options
使用AbilityInfo.AbilityType.SERVICE模板和account将当前Ability连接到一个Ability。 使用AbilityInfo.AbilityType.SERVICE模板和account将当前Ability连接到一个Ability。
**需要权限:** ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限:** ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -1450,7 +1474,7 @@ startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\< ...@@ -1450,7 +1474,7 @@ startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\<
根据account启动Ability(callback形式)。 根据account启动Ability(callback形式)。
**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -1506,7 +1530,7 @@ startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, ca ...@@ -1506,7 +1530,7 @@ startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, ca
根据account启动Ability(callback形式)。 根据account启动Ability(callback形式)。
**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -1566,7 +1590,7 @@ startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): ...@@ -1566,7 +1590,7 @@ startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions):
根据account启动Ability(Promise形式)。 根据account启动Ability(Promise形式)。
**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
......
...@@ -154,9 +154,11 @@ onAbilityContinue(ability: [UIAbility](js-apis-app-ability-uiAbility.md)): void; ...@@ -154,9 +154,11 @@ onAbilityContinue(ability: [UIAbility](js-apis-app-ability-uiAbility.md)): void;
| ability | [UIAbility](js-apis-app-ability-uiAbility.md) | 是 | 当前Ability对象 | | ability | [UIAbility](js-apis-app-ability-uiAbility.md) | 是 | 当前Ability对象 |
**示例:** **示例:**
MyAbilityStage.ts
```ts ```ts
import AbilityLifecycleCallback from "@ohos.app.ability.AbilityLifecycleCallback"; import AbilityLifecycleCallback from "@ohos.app.ability.AbilityLifecycleCallback";
import AbilityStage from "@ohos.app.ability.AbilityStage"
// 声明ability生命周期回调 // 声明ability生命周期回调
let abilityLifecycleCallback = { let abilityLifecycleCallback = {
...@@ -189,25 +191,31 @@ let abilityLifecycleCallback = { ...@@ -189,25 +191,31 @@ let abilityLifecycleCallback = {
} }
} }
var lifecycleId; export default class MyAbilityStage extends AbilityStage {
export default class MyAbility extends UIAbility {
onCreate() { onCreate() {
console.log("MyAbility onCreate") console.log("MyAbilityStage onCreate");
// 1.通过context属性获取applicationContext // 1.通过context属性获取applicationContext
let applicationContext = this.context.getApplicationContext(); let applicationContext = this.context.getApplicationContext();
// 2.通过applicationContext注册监听应用内生命周期 // 2.通过applicationContext注册监听应用内生命周期
try { try {
lifecycleId = applicationContext.on("abilityLifecycle", abilityLifecycleCallback); globalThis.lifecycleId = applicationContext.on("abilityLifecycle", abilityLifecycleCallback);
console.log("registerAbilityLifecycleCallback number: " + JSON.stringify(lifecycleId)); console.log("registerAbilityLifecycleCallback number: " + JSON.stringify(lifecycleId));
} catch (paramError) { } catch (paramError) {
console.log("error: " + paramError.code + " ," + paramError.message); console.log("error: " + paramError.code + " ," + paramError.message);
} }
}, }
}
```
MyAbility.ts
```ts
import UIAbility from "ohos.app.ability.UIAbility"
export default class MyAbility extends UIAbility {
onDestroy() { onDestroy() {
let applicationContext = this.context.getApplicationContext(); let applicationContext = this.context.getApplicationContext();
// 3.通过applicationContext注销监听应用内生命周期 // 3.通过applicationContext注销监听应用内生命周期
applicationContext.off("abilityLifecycle", lifecycleId, (error) => { applicationContext.off("abilityLifecycle", globalThis.lifecycleId, (error) => {
if (error.code != 0) { if (error.code != 0) {
console.log("unregisterAbilityLifecycleCallback failed, error: " + JSON.stringify(error)); console.log("unregisterAbilityLifecycleCallback failed, error: " + JSON.stringify(error));
} else { } else {
......
...@@ -118,7 +118,7 @@ class MyAbilityStage extends AbilityStage { ...@@ -118,7 +118,7 @@ class MyAbilityStage extends AbilityStage {
context: [AbilityStageContext](js-apis-inner-application-abilityStageContext.md); context: [AbilityStageContext](js-apis-inner-application-abilityStageContext.md);
指示AbilityStage的上下文 指示AbilityStage的上下文。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
......
...@@ -514,7 +514,7 @@ killProcessWithAccount(bundleName: string, accountId: number): Promise\<void\> ...@@ -514,7 +514,7 @@ killProcessWithAccount(bundleName: string, accountId: number): Promise\<void\>
切断account进程(Promise形式)。 切断account进程(Promise形式)。
**需要权限**:ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS, ohos.permission.CLEAN_BACKGROUND_PROCESSES **需要权限**:ohos.permission.CLEAN_BACKGROUND_PROCESSES,ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -554,7 +554,7 @@ killProcessWithAccount(bundleName: string, accountId: number, callback: AsyncCal ...@@ -554,7 +554,7 @@ killProcessWithAccount(bundleName: string, accountId: number, callback: AsyncCal
**系统API**: 此接口为系统接口,三方应用不支持调用。 **系统API**: 此接口为系统接口,三方应用不支持调用。
**需要权限**:ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS, ohos.permission.CLEAN_BACKGROUND_PROCESSES **需要权限**:ohos.permission.CLEAN_BACKGROUND_PROCESSES,ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS权限。
**参数:** **参数:**
......
...@@ -482,7 +482,7 @@ killProcessWithAccount(bundleName: string, accountId: number): Promise\<void\> ...@@ -482,7 +482,7 @@ killProcessWithAccount(bundleName: string, accountId: number): Promise\<void\>
切断account进程(Promise形式)。 切断account进程(Promise形式)。
**需要权限**:ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS, ohos.permission.CLEAN_BACKGROUND_PROCESSES **需要权限**:ohos.permission.CLEAN_BACKGROUND_PROCESSES,ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -520,7 +520,7 @@ killProcessWithAccount(bundleName: string, accountId: number, callback: AsyncCal ...@@ -520,7 +520,7 @@ killProcessWithAccount(bundleName: string, accountId: number, callback: AsyncCal
**系统API**: 此接口为系统接口,三方应用不支持调用。 **系统API**: 此接口为系统接口,三方应用不支持调用。
**需要权限**:ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS, ohos.permission.CLEAN_BACKGROUND_PROCESSES **需要权限**:ohos.permission.CLEAN_BACKGROUND_PROCESSES,ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS权限。
**参数:** **参数:**
......
...@@ -599,7 +599,7 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: ...@@ -599,7 +599,7 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback:
启动一个新的ServiceExtensionAbility(callback形式)。 启动一个新的ServiceExtensionAbility(callback形式)。
**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -666,7 +666,7 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\ ...@@ -666,7 +666,7 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\
启动一个新的ServiceExtensionAbility(Promise形式)。 启动一个新的ServiceExtensionAbility(Promise形式)。
**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -858,7 +858,7 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: ...@@ -858,7 +858,7 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback:
使用帐户停止同一应用程序内的服务(callback形式)。 使用帐户停止同一应用程序内的服务(callback形式)。
**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -921,7 +921,7 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\< ...@@ -921,7 +921,7 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\<
使用帐户停止同一应用程序内的服务(Promise形式)。 使用帐户停止同一应用程序内的服务(Promise形式)。
**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
......
...@@ -450,7 +450,7 @@ startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncC ...@@ -450,7 +450,7 @@ startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncC
启动一个Ability并在该Ability帐号销毁时返回执行结果(callback形式)。 启动一个Ability并在该Ability帐号销毁时返回执行结果(callback形式)。
**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -525,7 +525,7 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options: StartOp ...@@ -525,7 +525,7 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options: StartOp
启动一个Ability并在该Ability帐号销毁时返回执行结果(callback形式)。 启动一个Ability并在该Ability帐号销毁时返回执行结果(callback形式)。
**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -604,7 +604,7 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options?: StartO ...@@ -604,7 +604,7 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options?: StartO
启动一个Ability并在该Ability帐号销毁时返回执行结果(promise形式)。 启动一个Ability并在该Ability帐号销毁时返回执行结果(promise形式)。
**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -807,7 +807,7 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: ...@@ -807,7 +807,7 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback:
启动一个新的ServiceExtensionAbility(callback形式)。 启动一个新的ServiceExtensionAbility(callback形式)。
**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -869,7 +869,7 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\ ...@@ -869,7 +869,7 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\
启动一个新的ServiceExtensionAbility(Promise形式)。 启动一个新的ServiceExtensionAbility(Promise形式)。
**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -1048,7 +1048,7 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: ...@@ -1048,7 +1048,7 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback:
使用帐户停止同一应用程序内的服务(callback形式)。 使用帐户停止同一应用程序内的服务(callback形式)。
**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -1111,7 +1111,7 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\< ...@@ -1111,7 +1111,7 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\<
使用帐户停止同一应用程序内的服务(Promise形式)。 使用帐户停止同一应用程序内的服务(Promise形式)。
**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -1436,7 +1436,7 @@ connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options ...@@ -1436,7 +1436,7 @@ connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options
使用AbilityInfo.AbilityType.SERVICE模板和account将当前Ability连接到一个Ability。 使用AbilityInfo.AbilityType.SERVICE模板和account将当前Ability连接到一个Ability。
**需要权限:** ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限:** ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -1696,7 +1696,7 @@ startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\< ...@@ -1696,7 +1696,7 @@ startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\<
根据account启动Ability(callback形式)。 根据account启动Ability(callback形式)。
**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -1770,7 +1770,7 @@ startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, ca ...@@ -1770,7 +1770,7 @@ startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, ca
根据account启动Ability(callback形式)。 根据account启动Ability(callback形式)。
**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
...@@ -1848,7 +1848,7 @@ startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): ...@@ -1848,7 +1848,7 @@ startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions):
根据account启动Ability(Promise形式)。 根据account启动Ability(Promise形式)。
**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core **系统能力**:SystemCapability.Ability.AbilityRuntime.Core
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册