Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
d19ea7db
D
Docs
项目概览
OpenHarmony
/
Docs
1 年多 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d19ea7db
编写于
12月 05, 2022
作者:
Z
zhongjianfei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify docs bugs
Signed-off-by:
N
zhongjianfei
<
zhongjianfei@huawei.com
>
上级
f442ea8c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
3 addition
and
3 deletion
+3
-3
zh-cn/application-dev/application-models/common-event-subscription.md
...ation-dev/application-models/common-event-subscription.md
+1
-1
zh-cn/application-dev/application-models/context-switch.md
zh-cn/application-dev/application-models/context-switch.md
+2
-2
未找到文件。
zh-cn/application-dev/application-models/common-event-subscription.md
浏览文件 @
d19ea7db
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
## 场景介绍
## 场景介绍
当需要订阅某个公共事件,获取该公共事件传递的参数时,需要创建一个订阅者对象,用于作为订阅公共事件的载体,订阅公共事件并获取公共事件传递而来的参数。订阅部分系统公共事件需要先
[
申请权限
](
../security/accesstoken-guidelines.md
)
,订阅这些事件所需要的权限请见
[
公共事件权限列表
](
../reference/apis/js-apis-commonEvent.md#
S
upport
)
。
当需要订阅某个公共事件,获取该公共事件传递的参数时,需要创建一个订阅者对象,用于作为订阅公共事件的载体,订阅公共事件并获取公共事件传递而来的参数。订阅部分系统公共事件需要先
[
申请权限
](
../security/accesstoken-guidelines.md
)
,订阅这些事件所需要的权限请见
[
公共事件权限列表
](
../reference/apis/js-apis-commonEvent.md#
s
upport
)
。
## 接口说明
## 接口说明
...
...
zh-cn/application-dev/application-models/context-switch.md
浏览文件 @
d19ea7db
...
@@ -12,9 +12,9 @@
...
@@ -12,9 +12,9 @@
|
[
setDisplayOrientation(orientation:bundle.DisplayOrientation, callback:AsyncCallback<void>):void;
](
../reference/apis/js-apis-Context.md#contextsetdisplayorientation7
)
<br/>[setDisplayOrientation(orientation:bundle.DisplayOrientation):Promise<void>;](../reference/apis/js-apis-Context.md#contextsetdisplayorientation7-1) | \@ohos.screen.d.ts | [setOrientation(orientation: Orientation, callback: AsyncCallback<void>): void;](../reference/apis/js-apis-screen.md#setorientation)<br/>
[
setOrientation(orientation: Orientation): Promise<void>;
](
../reference/apis/js-apis-screen.md#setorientation-1
)
|
|
[
setDisplayOrientation(orientation:bundle.DisplayOrientation, callback:AsyncCallback<void>):void;
](
../reference/apis/js-apis-Context.md#contextsetdisplayorientation7
)
<br/>[setDisplayOrientation(orientation:bundle.DisplayOrientation):Promise<void>;](../reference/apis/js-apis-Context.md#contextsetdisplayorientation7-1) | \@ohos.screen.d.ts | [setOrientation(orientation: Orientation, callback: AsyncCallback<void>): void;](../reference/apis/js-apis-screen.md#setorientation)<br/>
[
setOrientation(orientation: Orientation): Promise<void>;
](
../reference/apis/js-apis-screen.md#setorientation-1
)
|
|
[
setShowOnLockScreen(show:boolean, callback:AsyncCallback<void>):void;
](
../reference/apis/js-apis-Context.md#contextsetshowonlockscreen7
)
<br/>
[
setShowOnLockScreen(show:boolean):Promise<void>;
](
../reference/apis/js-apis-Context.md#contextsetshowonlockscreen7-1
)
|
\@
ohos.window.d.ts |
[
setShowOnLockScreen(showOnLockScreen: boolean): void;
](
../reference/apis/js-apis-window.md#setshowonlockscreen9
)
|
|
[
setShowOnLockScreen(show:boolean, callback:AsyncCallback<void>):void;
](
../reference/apis/js-apis-Context.md#contextsetshowonlockscreen7
)
<br/>
[
setShowOnLockScreen(show:boolean):Promise<void>;
](
../reference/apis/js-apis-Context.md#contextsetshowonlockscreen7-1
)
|
\@
ohos.window.d.ts |
[
setShowOnLockScreen(showOnLockScreen: boolean): void;
](
../reference/apis/js-apis-window.md#setshowonlockscreen9
)
|
|
[
setWakeUpScreen(wakeUp:boolean, callback:AsyncCallback<void>):void;
](
../reference/apis/js-apis-Context.md#contextsetwakeupscreen7
)
<br/>
[
setWakeUpScreen(wakeUp:boolean):Promise<void>;
](
../reference/apis/js-apis-Context.md#contextsetwakeupscreen7-1
)
|
\@
ohos.window.d.ts |
[
setWakeUpScreen(wakeUp: boolean): void;
](
../reference/apis/js-apis-window.md#setwakeupscreen9
)
|
|
[
setWakeUpScreen(wakeUp:boolean, callback:AsyncCallback<void>):void;
](
../reference/apis/js-apis-Context.md#contextsetwakeupscreen7
)
<br/>
[
setWakeUpScreen(wakeUp:boolean):Promise<void>;
](
../reference/apis/js-apis-Context.md#contextsetwakeupscreen7-1
)
|
\@
ohos.window.d.ts |
[
setWakeUpScreen(wakeUp: boolean): void;
](
../reference/apis/js-apis-window.md#setwakeupscreen9
)
|
|
[
getProcessInfo(callback:AsyncCallback<ProcessInfo>):void;
](
../reference/apis/js-apis-Context.md#contextgetprocessinfo7
)
<br/>[getProcessInfo():Promise<ProcessInfo>;](../reference/apis/js-apis-Context.md#contextgetprocessinfo7-1) | \@ohos.app.ability.abilityManager.d.ts | [getAbilityRunningInfos(callback: AsyncCallback<Array<AbilityRunningInfo>>): void;](../reference/apis/js-apis-app
-ability-abilityManager.md#getabilityrunninginfos)<br/>
[
getAbilityRunningInfos(): Promise<Array<AbilityRunningInfo>>;
](
../reference/apis/js-apis-app-ability
-abilityManager.md#getabilityrunninginfos-1
)
|
|
[
getProcessInfo(callback:AsyncCallback<ProcessInfo>):void;
](
../reference/apis/js-apis-Context.md#contextgetprocessinfo7
)
<br/>[getProcessInfo():Promise<ProcessInfo>;](../reference/apis/js-apis-Context.md#contextgetprocessinfo7-1) | \@ohos.app.ability.abilityManager.d.ts | [getAbilityRunningInfos(callback: AsyncCallback<Array<AbilityRunningInfo>>): void;](../reference/apis/js-apis-app
lication-abilityManager.md#getabilityrunninginfos)<br/>
[
getAbilityRunningInfos(): Promise<Array<AbilityRunningInfo>>;
](
../reference/apis/js-apis-application
-abilityManager.md#getabilityrunninginfos-1
)
|
|
[
getElementName(callback:AsyncCallback<ElementName>):void;
](
../reference/apis/js-apis-Context.md#contextgetelementname7
)
<br/>
[
getElementName():Promise<ElementName>;
](
../reference/apis/js-apis-Context.md#contextgetelementname7-1
)
| application
\U
IAbilityContext.d.ts |
[
abilityInfo.name: string;
](
../reference/apis/js-apis-ability-context.md#属性
)
<br/>
[
abilityInfo.bundleName: string;
](
../reference/apis/js-apis-ability-context.md#属性
)
|
|
[
getElementName(callback:AsyncCallback<ElementName>):void;
](
../reference/apis/js-apis-Context.md#contextgetelementname7
)
<br/>
[
getElementName():Promise<ElementName>;
](
../reference/apis/js-apis-Context.md#contextgetelementname7-1
)
| application
\U
IAbilityContext.d.ts |
[
abilityInfo.name: string;
](
../reference/apis/js-apis-ability-context.md#属性
)
<br/>
[
abilityInfo.bundleName: string;
](
../reference/apis/js-apis-ability-context.md#属性
)
|
|
[
getProcessName(callback:AsyncCallback<string>):void;
](
../reference/apis/js-apis-Context.md#contextgetprocessname7
)
<br/>[getProcessName():Promise<string>;](../reference/apis/js-apis-Context.md#contextgetprocessname7-1) | \@ohos.app.ability.abilityManager.d.ts | [getAbilityRunningInfos(callback: AsyncCallback<Array<AbilityRunningInfo>>): void;](../reference/apis/js-apis-app
-ability-abilityManager.md#getabilityrunninginfos)<br/>
[
getAbilityRunningInfos(): Promise<Array<AbilityRunningInfo>>;
](
../reference/apis/js-apis-app-ability
-abilityManager.md#getabilityrunninginfos-1
)
|
|
[
getProcessName(callback:AsyncCallback<string>):void;
](
../reference/apis/js-apis-Context.md#contextgetprocessname7
)
<br/>[getProcessName():Promise<string>;](../reference/apis/js-apis-Context.md#contextgetprocessname7-1) | \@ohos.app.ability.abilityManager.d.ts | [getAbilityRunningInfos(callback: AsyncCallback<Array<AbilityRunningInfo>>): void;](../reference/apis/js-apis-app
lication-abilityManager.md#getabilityrunninginfos)<br/>
[
getAbilityRunningInfos(): Promise<Array<AbilityRunningInfo>>;
](
../reference/apis/js-apis-application
-abilityManager.md#getabilityrunninginfos-1
)
|
|
[
getCallingBundle(callback:AsyncCallback<string>):void;
](
../reference/apis/js-apis-Context.md#contextgetcallingbundle7
)
<br/>
[
getCallingBundle():Promise<string>;
](
../reference/apis/js-apis-Context.md#contextgetcallingbundle7-1
)
| Stage模型无对应接口 | Stage模型应用可以使用Want.parameters的ohos.aafwk.param.callerUid参数,获取调用方的应用信息 |
|
[
getCallingBundle(callback:AsyncCallback<string>):void;
](
../reference/apis/js-apis-Context.md#contextgetcallingbundle7
)
<br/>
[
getCallingBundle():Promise<string>;
](
../reference/apis/js-apis-Context.md#contextgetcallingbundle7-1
)
| Stage模型无对应接口 | Stage模型应用可以使用Want.parameters的ohos.aafwk.param.callerUid参数,获取调用方的应用信息 |
|
[
getFilesDir(callback:AsyncCallback<string>):void;
](
../reference/apis/js-apis-Context.md#contextgetfilesdir
)
<br/>
[
getFilesDir():Promise<string>;
](
../reference/apis/js-apis-Context.md#contextgetfilesdir-1
)
| application
\C
ontext.d.ts |
[
filesDir: string;
](
../reference/apis/js-apis-application-context.md#属性
)
|
|
[
getFilesDir(callback:AsyncCallback<string>):void;
](
../reference/apis/js-apis-Context.md#contextgetfilesdir
)
<br/>
[
getFilesDir():Promise<string>;
](
../reference/apis/js-apis-Context.md#contextgetfilesdir-1
)
| application
\C
ontext.d.ts |
[
filesDir: string;
](
../reference/apis/js-apis-application-context.md#属性
)
|
|
[
getCacheDir(callback:AsyncCallback<string>):void;
](
../reference/apis/js-apis-Context.md#contextgetcachedir
)
<br/>
[
getCacheDir():Promise<string>;
](
../reference/apis/js-apis-Context.md#contextgetcachedir-1
)
| application
\C
ontext.d.ts |
[
cacheDir: string;
](
../reference/apis/js-apis-application-context.md#属性
)
|
|
[
getCacheDir(callback:AsyncCallback<string>):void;
](
../reference/apis/js-apis-Context.md#contextgetcachedir
)
<br/>
[
getCacheDir():Promise<string>;
](
../reference/apis/js-apis-Context.md#contextgetcachedir-1
)
| application
\C
ontext.d.ts |
[
cacheDir: string;
](
../reference/apis/js-apis-application-context.md#属性
)
|
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录