openharmony 鸿蒙 changelogs-wifiManager

2023-10-30 浏览 (244)

Wi-Fi Subsystem Changelog

cl.wifiManager.1 Change of the API Permissions

Involved APIs

APIPermission Before ChangePermission After Change
function getCandidateConfigs(): Array;The location permission is required.The location permission is not required.
function getDeviceConfigs(): Array;The location permission is required.The location permission is not required.
function getStations(): Array;1. The location permission is required.
2. The physical MAC address is returned.
1. The location permission is not required.
2. A random MAC address is returned (the GET_PEER_MAC permission is required if a real MAC address is returned).
function getCurrentP2pGroup(): Promise;The location permission is required.The location permission is not required.
function getCurrentP2pGroup(callback: AsyncCallback): void;The location permission is required.The location permission is not required.
function getP2pPeerDevices(): Promise<WifiP2pDevice[]>;1. The location permission is required.
2. The physical MAC address is returned.
1. The location permission is not required.
2. A random MAC address is returned (the GET_PEER_MAC permission is required if a real MAC address is returned).
function getP2pPeerDevices(callback: AsyncCallback<WifiP2pDevice[]>): void;The location permission is required.1. The location permission is not required.
2. A random MAC address is returned (the GET_PEER_MAC permission is required if a real MAC address is returned).
function p2pConnect(config: WifiP2PConfig): void;The location permission is required.The location permission is not required.
function startDiscoverDevices(): void;The location permission is required.The location permission is not required.
function getP2pGroups(): Promise<Array>;The location permission is required.The location permission is not required.
function getP2pGroups(callback: AsyncCallback<Array>): void;The location permission is required.The location permission is not required.
function on(type: "p2pDeviceChange", callback: Callback): void;1. The location permission is required.
2. The physical MAC address is returned.
1. The location permission is not required.
2. A random MAC address is returned (the GET_PEER_MAC permission is required if a real MAC address is returned).
function off(type: "p2pDeviceChange", callback?: Callback): void;1. The location permission is required.
2. The physical MAC address is returned.
1. The location permission is not required.
2. A random MAC address is returned (the GET_PEER_MAC permission is required if a real MAC address is returned).
function on(type: "p2pPeerDeviceChange", callback: Callback<WifiP2pDevice[]>): void;1. The location permission is required.
2. The physical MAC address is returned.
1. The location permission is not required.
2. A random MAC address is returned (the GET_PEER_MAC permission is required if a real MAC address is returned).
function off(type: "p2pPeerDeviceChange", callback?: Callback<WifiP2pDevice[]>): void;1. The location permission is required.
2. The physical MAC address is returned.
1. The location permission is not required.
2. A random MAC address is returned (the GET_PEER_MAC permission is required if a real MAC address is returned).

Change Impact If your application is developed using the involved APIs of earlier versions, apply for the required permissions for the new APIs.

Key API/Component Changes NA

Adaptation Guide Apply for the required permissions for the involved APIs.

cl.wifiManager.2 Change of the APIs Related to Wi-Fi Scan Capabilities

Deprecated scan(), getScanResults(), and getScanResultsSync(), and added new APIs to provide the related capabilities.

Change Impact The following APIs are deprecated since API 10, without affecting the compatibility of developed applications. However, you are advised to use new APIs.

Key API/Component Changes

Deprecated APINew APIDescription
function scan(): void;function startScan(): void;Use startScan to start Wi-Fi scan.
function getScanResults(): Promise<Array>;function getScanInfoList(): Array;Use getScanInfoList to obtain the scan result.
function getScanResults(callback: AsyncCallback<Array>): void;function getScanInfoList(): Array;Use getScanInfoList to obtain the scan result.
function getScanResultsSync(): Array;function getScanInfoList(): Array;Use getScanInfoList to obtain the scan result.

Adaptation Guide Use the new APIs.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙ArkUI Subsystem Changelog

harmony 鸿蒙Application Access Control Subsystem Changelog

harmony 鸿蒙Account Subsystem Changelog

harmony 鸿蒙Bluetooth Subsystem Changelog

harmony 鸿蒙Bundle Management Subsystem Changelog

harmony 鸿蒙Security Subsystem Changelog

harmony 鸿蒙Graphics Subsystem Changelog

harmony 鸿蒙Input Method Framework Subsystem – Input Method Framework Service Changelog

harmony 鸿蒙Telephony Subsystem Changelog

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/8be707f85523495d9855d7f318586077