From 5fc023affd54116adb286619340157907c98aef9 Mon Sep 17 00:00:00 2001 From: liu-binjun Date: Thu, 21 Nov 2024 15:55:44 +0800 Subject: [PATCH] feature:get wifi mac Signed-off-by: liu-binjun --- api/@ohos.geoLocationManager.d.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/api/@ohos.geoLocationManager.d.ts b/api/@ohos.geoLocationManager.d.ts index a9f1e4f6f..90e641a4c 100644 --- a/api/@ohos.geoLocationManager.d.ts +++ b/api/@ohos.geoLocationManager.d.ts @@ -999,6 +999,21 @@ declare namespace geoLocationManager { */ function getLocationIconStatus(): LocationIconStatus; + /** + * Obtains the BSSID of the connected Wi-Fi hotspot. + * @permission ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION + * @returns {string} Returns the BSSID of the connected Wi-Fi hotspot. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.getCurrentWifiBssidForLocating()} due to limited device capabilities. + * @throws { BusinessError } 3301000 - The location service is unavailable. + * @throws { BusinessError } 3301100 - The location switch is off. + * @throws { BusinessError } 3301900 - Failed to obtain the BSSID of the Wi-Fi hotspot. The Wi-Fi network is not connected. + * @syscap SystemCapability.Location.Location.Core + * @crossplatform + * @since 14 + */ + function getCurrentWifiBssidForLocating(): string; + /** * Configuration parameters for simulating reverse geocoding. *