harmony 鸿蒙Location Subsystem ChangeLog
Location Subsystem ChangeLog
cl.location.1 Deletion of the geoLocationManager.requestEnableLocation API in API Version 9
When the location function is disabled, your application can call the geoLocationManager.requestEnableLocation API to request the user to enable the location function. However, this API is seldom used because the user is not notified of the scenario in which your application uses the location information.
Therefore, your application shows a popup, asking the user to go to the settings page and enable the location function. In addition, the popup clearly states the scenarios in which the location information will be used, improving user experience.
Change Impacts
Your application cannot use the geoLocationManager.requestEnableLocation API in API version 9 to request the user to enable the location function. Instead, you need to implement a popup asking the user to enable the location function for your application.
Key API/Component Changes
Class | API Type | Declaration | Change Type |
---|---|---|---|
geoLocationManager | method | function requestEnableLocation(callback: AsyncCallback<boolean>): void; | Deleted from API version 9 |
geoLocationManager | method | function requestEnableLocation(): Promise<boolean>; | Deleted from API version 9 |
你可能感兴趣的鸿蒙文章
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦