From 1e8eb5d2e12d93c50f96c8767f412f49a6d66ee8 Mon Sep 17 00:00:00 2001 From: liu-binjun Date: Fri, 21 Jul 2023 16:36:54 +0800 Subject: [PATCH] bugfix:add change log Signed-off-by: liu-binjun --- .../changelogs-geoLocationManager.md | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 zh-cn/release-notes/changelogs/OpenHarmony_4.0.9.2/changelogs-geoLocationManager.md diff --git a/zh-cn/release-notes/changelogs/OpenHarmony_4.0.9.2/changelogs-geoLocationManager.md b/zh-cn/release-notes/changelogs/OpenHarmony_4.0.9.2/changelogs-geoLocationManager.md new file mode 100644 index 0000000000..7a99c6a861 --- /dev/null +++ b/zh-cn/release-notes/changelogs/OpenHarmony_4.0.9.2/changelogs-geoLocationManager.md @@ -0,0 +1,37 @@ +# 位置服务子系统ChangeLog + +## cl.location.1 新增获取WiFi/BT扫描结果的系统接口 + +@ohos.geoLocationManager.d.ts中增加获取WiFi/BT扫描结果的接口,这些接口是systemApi。 + +**变更影响** + +系统应用可以从调用@ohos.geoLocationManager.d.ts中的接口获取WiFi/BT扫描结果,用于网络定位。 + +**关键的接口/组件变更** + +| 类名 | 接口类型 | 接口声明 | 变更类型 | +| -- | -- | -- | -- | +|geoLocationManager| method | function on(type: 'locatingRequiredDataChange', config: LocatingRequiredDataConfig, callback: Callback<Array<LocatingRequiredData>>): void; | 新增接口 | +|geoLocationManager| method | function off(type: 'locatingRequiredDataChange', callback?: Callback<Array<LocatingRequiredData>>): void; | 新增接口 | +|geoLocationManager| method | function getLocatingRequiredData(config: LocatingRequiredDataConfig): Promise<Array<LocatingRequiredData>>; | 新增接口 | + +**适配指导** + +以单次获取扫描信息为例: + + ```ts + import geoLocationManager from '@ohos.geoLocationManager'; + let config = {'type': 1, 'needStartScan': true, 'scanInterval': 10000}; + try { + geoLocationManager.getLocatingRequiredData(config).then((result) => { + console.log('getLocatingRequiredData return: ' + JSON.stringify(result)); + }) + .catch((error) => { + console.log('promise, getLocatingRequiredData: error=' + JSON.stringify(error)); + }); + } catch (err) { + console.error("errCode:" + err.code + ",errMessage:" + err.message); + } + ``` + -- GitLab