> 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.
| 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
...
...
@@ -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.|
| isConfirmed | boolean | Yes| Callback used to return the result, which indicates whether the user agrees with the privacy statement.|
| callback | AsyncCallback<boolean> | Yes| Callback used to return the operation result.|
- Example
...
...
@@ -888,22 +1147,28 @@ Sets the user confirmation status for the privacy statement of the location serv
| type | LocationPrivacyType | Yes| Privacy statement type, for example, privacy statement displayed in the startup wizard or privacy statement displayed when enabling the location service.|
| isConfirmed | boolean | Yes| Callback used to return the result, which indicates whether the user agrees with the privacy statement.|
| DAILY_LIFE_SERVICE | 0x304 | Daily life services.|
| 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. |
| 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 . |
| 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.|
| 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 .|
| 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. |
| 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. |
| 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. |
| maxLatitude | number | No | Maximum latitude. |
| maxLongitude | number | No | Maximum longitude. |
| 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.|
| 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.|
| 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 . |
| locale | string | No | Language used for the location description. **zh** indicates Chinese, and **en** indicates English. |
| placeName | string | No | Landmark of the location. |
| countryCode | string | No | Country code. |
| countryName | string | No | Country name. |
| administrativeArea | string | No | Administrative region name. |
| subAdministrativeArea | string | No | Sub-administrative region name. |
| locality | string | No | Locality information. |
| subLocality | string | No | Sub-locality information. |
| roadName | string | No | Road name. |
| subRoadName | string | No | Auxiliary road information. |
| premises | string | No | House information. |
| postalCode | string | No | Postal code. |
| phoneNumber | string | No | Phone number. |
| addressUrl | string | No | Website URL. |
| descriptions | Array<string> | No | Additional description. |
| descriptionsSize | number | No | Total number of additional descriptions. |
| 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 .|
| locale | string | No| Language used for the location description. **zh** indicates Chinese, and **en** indicates English.|
| placeName | string | No| Landmark of the location.|
| countryCode | string | No| Country code.|
| countryName | string | No| Country name.|
| administrativeArea | string | No| Administrative region name.|
| subAdministrativeArea | string | No| Sub-administrative region name.|
| reportingPeriodSec | number | Yes| Interval for reporting the cached GNSS locations, in milliseconds.|
| 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.
| 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 . |
| altitude | number | Yes | Location altitude, in meters. |
| accuracy | number | Yes | Location accuracy, in meters. |
| speed | number | Yes | Speed, in m/s. |
| timeStamp | number | Yes | Location timestamp in the UTC format. |
| direction | number | Yes | Direction information. |
| timeSinceBoot | number | Yes | Location timestamp since boot. |
| additions | Array<string> | No | Additional description. |
| additionSize | number | No | Number of additional descriptions. |
| 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 .|
| altitude | number | Yes| Location altitude, in meters.|
| accuracy | number | Yes| Location accuracy, in meters.|
| speed | number | Yes| Speed, in m/s.|
| timeStamp | number | Yes| Location timestamp in the UTC format.|
| direction | number | Yes| Direction information.|
| timeSinceBoot | number | Yes| Location timestamp since boot.|