提交 ed6fff29 编写于 作者: L liu-binjun

arkTs适配

Signed-off-by: Nliu-binjun <liubinjun@huawei.com>
上级 d9424047
......@@ -40,7 +40,7 @@
针对位置服务,有以下相关实例可供参考:
- [`Location`:位置服务(ArkTS)(API9)](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/DeviceManagement/Location)
- [`Location`:位置服务(ArkTS)(API9)](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/DeviceManagement/Location)
## 申请位置权限开发指导
......@@ -338,7 +338,7 @@
```ts
import geoLocationManager from '@ohos.geoLocationManager';
import wantAgent from '@ohos.app.ability.wantAgent';
import wantAgent, {WantAgent as _wantAgent} from '@ohos.app.ability.wantAgent';
import BusinessError from "@ohos.base";
```
......@@ -347,7 +347,7 @@
场景一:创建拉起Ability的WantAgentInfo信息。
```ts
let wantAgentObj:wantAgent.WantAgentInfo|null = null; // 用于保存创建成功的wantAgent对象,后续使用其完成触发的动作。
let wantAgentObj:_wantAgent|null = null; // 用于保存创建成功的wantAgent对象,后续使用其完成触发的动作。
// 通过WantAgentInfo的operationType设置动作类型
let wantAgentInfo:wantAgent.WantAgentInfo = {
......@@ -371,7 +371,7 @@
场景二:创建发布[公共事件](../application-models/common-event-overview.md)的WantAgentInfo信息。
```ts
let wantAgentObj:wantAgent.WantAgentInfo|null = null; // 用于保存创建成功的WantAgent对象,后续使用其完成触发的动作。
let wantAgentObj:_wantAgent|null = null; // 用于保存创建成功的WantAgent对象,后续使用其完成触发的动作。
// 通过WantAgentInfo的operationType设置动作类型
let wantAgentInfo:wantAgent.WantAgentInfo = {
......@@ -415,4 +415,4 @@
针对位置开发,有以下相关实例可供参考:
- [位置服务(ArkTS)(API9)](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/DeviceManagement/Location)
\ No newline at end of file
- [位置服务(ArkTS)(API9)](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/DeviceManagement/Location)
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册