> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
| type | LocationPrivacyType | Yes | Privacy statement type, for example, privacy statement displayed in the startup wizard or privacy statement displayed when enabling the location service. |
| type | LocationPrivacyType | Yes| Privacy statement type, for example, privacy statement displayed in the startup wizard or privacy statement displayed when enabling the location service.|
| callback | AsyncCallback<boolean> | Yes| Callback used to return the result, which indicates whether the user agrees with the privacy statement.|
- Example
- Example
...
@@ -841,21 +1088,27 @@ Checks whether a user agrees with the privacy statement of the location service.
...
@@ -841,21 +1088,27 @@ Checks whether a user agrees with the privacy statement of the location service.
| type | LocationPrivacyType | Yes | Privacy statement type, for example, privacy statement displayed in the startup wizard or privacy statement displayed when enabling the location service. |
| type | LocationPrivacyType | Yes| Privacy statement type, for example, privacy statement displayed in the startup wizard or privacy statement displayed when enabling the location service.|
| type | LocationPrivacyType | Yes | Privacy statement type, for example, privacy statement displayed in the startup wizard or privacy statement displayed when enabling the location service. |
| type | LocationPrivacyType | Yes| Privacy statement type, for example, privacy statement displayed in the startup wizard or privacy statement displayed when enabling the location service.|
| type | LocationPrivacyType | Yes | Privacy statement type, for example, privacy statement displayed in the startup wizard or privacy statement displayed when enabling the location service. |
| type | LocationPrivacyType | Yes| Privacy statement type, for example, privacy statement displayed in the startup wizard or privacy statement displayed when enabling the location service.|
| NO_POWER | 0x305 | Power efficiency. Your application does not proactively start the location service. When responding to another application requesting the same location service, the system marks a copy of the location result to your application. In this way, your application will not consume extra power for obtaining the user location.|
| locale | string | No | Language used for the location description. **zh** indicates Chinese, and **en** indicates English. |
| locale | string | No| Language used for the location description. **zh** indicates Chinese, and **en** indicates English.|
| latitude | number | Yes | Latitude information. A positive value indicates north latitude, and a negative value indicates south latitude. |
| latitude | number | Yes| Latitude information. A positive value indicates north latitude, and a negative value indicates south latitude.|
| longitude | number | Yes | Longitude information. A positive value indicates east longitude , and a negative value indicates west longitude . |
| longitude | number | Yes| Longitude information. A positive value indicates east longitude , and a negative value indicates west longitude .|
| maxItems | number | No | Maximum number of location records to be returned. |
| maxItems | number | No| Maximum number of location records to be returned.|
| locale | string | No | Language used for the location description. **zh** indicates Chinese, and **en** indicates English. |
| locale | string | No| Language used for the location description. **zh** indicates Chinese, and **en** indicates English.|
| description | number | Yes | Location description, for example, **No. xx, xx Road, Pudong New District, Shanghai**. |
| description | number | Yes| Location description, for example, No. xx, xx Road, Pudong New District, Shanghai.|
| maxItems | number | No | Maximum number of location records to be returned. |
| maxItems | number | No| Maximum number of location records to be returned.|
| minLatitude | number | No | Minimum latitude. This parameter is used with **minLongitude**, **maxLatitude**, and **maxLongitude** to specify the latitude and longitude ranges. |
| minLatitude | number | No| Minimum latitude. This parameter is used with minLongitude, maxLatitude, and maxLongitude to specify the latitude and longitude ranges.|
| minLongitude | number | No | Minimum longitude. |
| minLongitude | number | No| Minimum longitude.|
| maxLatitude | number | No | Maximum latitude. |
| maxLatitude | number | No| Maximum latitude.|
| maxLongitude | number | No | Maximum longitude. |
| latitude | number | No | Latitude information. A positive value indicates north latitude, and a negative value indicates south latitude. |
| latitude | number | No| Latitude information. A positive value indicates north latitude, and a negative value indicates south latitude.|
| longitude | number | No | Longitude information. A positive value indicates east longitude , and a negative value indicates west longitude . |
| longitude | number | No| Longitude information. A positive value indicates east longitude , and a negative value indicates west longitude .|
| locale | string | No | Language used for the location description. **zh** indicates Chinese, and **en** indicates English. |
| locale | string | No| Language used for the location description. **zh** indicates Chinese, and **en** indicates English.|
| placeName | string | No | Landmark of the location. |
| placeName | string | No| Landmark of the location.|
| countryCode | string | No | Country code. |
| countryCode | string | No| Country code.|
| countryName | string | No | Country name. |
| countryName | string | No| Country name.|
| administrativeArea | string | No | Administrative region name. |
| administrativeArea | string | No| Administrative region name.|
| subAdministrativeArea | string | No | Sub-administrative region name. |
| subAdministrativeArea | string | No| Sub-administrative region name.|
| locality | string | No | Locality information. |
| locality | string | No| Locality information. |
| subLocality | string | No | Sub-locality information. |
| wakeUpCacheQueueFull | boolean | Yes| **true**: reports the cached GNSS locations to the application when the cache queue is full.<br>**false**: discards the cached GNSS locations when the cache queue is full.|
## Geofence
## Geofence<sup>8+</sup>
Defines a GNSS geofence. Currently, only circular geofences are supported.
Defines a GNSS geofence. Currently, only circular geofences are supported.
| latitude | number | Yes | Latitude information. A positive value indicates north latitude, and a negative value indicates south latitude. |
| latitude | number | Yes| Latitude information. A positive value indicates north latitude, and a negative value indicates south latitude.|
| longitude | number | Yes | Longitude information. A positive value indicates east longitude , and a negative value indicates west longitude . |
| longitude | number | Yes| Longitude information. A positive value indicates east longitude , and a negative value indicates west longitude .|
| altitude | number | Yes | Location altitude, in meters. |
| altitude | number | Yes| Location altitude, in meters.|
| accuracy | number | Yes | Location accuracy, in meters. |
| accuracy | number | Yes| Location accuracy, in meters.|
| speed | number | Yes | Speed, in m/s. |
| speed | number | Yes| Speed, in m/s.|
| timeStamp | number | Yes | Location timestamp in the UTC format. |
| timeStamp | number | Yes| Location timestamp in the UTC format.|
| direction | number | Yes | Direction information. |
| direction | number | Yes| Direction information.|
| timeSinceBoot | number | Yes | Location timestamp since boot. |
| timeSinceBoot | number | Yes| Location timestamp since boot.|
| additions | Array<string> | No | Additional description. |