• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit LocationKit
19 */
20
21import { AsyncCallback, Callback } from './@ohos.base';
22/*** if arkts 1.1 */
23import { WantAgent } from './@ohos.wantAgent';
24/*** endif */
25/*** if arkts 1.2 */
26import { WantAgent } from '@ohos.app.ability.wantAgent';
27/*** endif */
28import { NotificationRequest } from './notification/notificationRequest';
29
30/**
31 * Provides interfaces for acquiring location information, managing location switches,
32 * geocoding, reverse geocoding, country code, fencing and other functions.
33 *
34 * @namespace geoLocationManager
35 * @since 9
36 */
37/**
38 * Provides interfaces for acquiring location information, managing location switches,
39 * geocoding, reverse geocoding, country code, fencing and other functions.
40 *
41 * @namespace geoLocationManager
42 * @syscap SystemCapability.Location.Location.Core
43 * @atomicservice
44 * @since arkts {'1.1':'11','1.2':'20'}
45 * @arkts 1.1&1.2
46 */
47declare namespace geoLocationManager {
48  /**
49   * Subscribe location changed.
50   *
51   * @permission ohos.permission.APPROXIMATELY_LOCATION
52   * @param { 'locationChange' } type - Indicates the location service event to be subscribed to.
53   * @param { LocationRequest } request - Indicates the location request parameters.
54   * @param { Callback<Location> } callback - Indicates the callback for reporting the location result.
55   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
56   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
57   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.on('locationChange')} due to limited device capabilities.
58   * @throws { BusinessError } 3301000 - The location service is unavailable.
59   * @throws { BusinessError } 3301100 - The location switch is off.
60   * @throws { BusinessError } 3301200 - Failed to obtain the geographical location.
61   * @syscap SystemCapability.Location.Location.Core
62   * @since 9
63   */
64  /**
65   * Subscribe location changed.
66   *
67   * @permission ohos.permission.APPROXIMATELY_LOCATION
68   * @param { 'locationChange' } type - Indicates the location service event to be subscribed to.
69   * @param { LocationRequest } request - Indicates the location request parameters.
70   * @param { Callback<Location> } callback - Indicates the callback for reporting the location result.
71   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
72   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
73   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.on('locationChange')} due to limited device capabilities.
74   * @throws { BusinessError } 3301000 - The location service is unavailable.
75   * @throws { BusinessError } 3301100 - The location switch is off.
76   * @throws { BusinessError } 3301200 - Failed to obtain the geographical location.
77   * @syscap SystemCapability.Location.Location.Core
78   * @atomicservice
79   * @since 11
80   */
81  /**
82   * Subscribe location changed.
83   *
84   * @permission ohos.permission.APPROXIMATELY_LOCATION
85   * @param { 'locationChange' } type - Indicates the location service event to be subscribed to.
86   * @param { LocationRequest | ContinuousLocationRequest } request - Indicates the location request parameters.
87   * @param { Callback<Location> } callback - Indicates the callback for reporting the location result.
88   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
89   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
90   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.on('locationChange')} due to limited device capabilities.
91   * @throws { BusinessError } 3301000 - The location service is unavailable.
92   * @throws { BusinessError } 3301100 - The location switch is off.
93   * @throws { BusinessError } 3301200 - Failed to obtain the geographical location.
94   * @syscap SystemCapability.Location.Location.Core
95   * @atomicservice
96   * @since 12
97   */
98  /**
99   * Subscribe location changed.
100   *
101   * @permission ohos.permission.APPROXIMATELY_LOCATION
102   * @param { 'locationChange' } type - Indicates the location service event to be subscribed to.
103   * @param { LocationRequest | ContinuousLocationRequest } request - Indicates the location request parameters.
104   * @param { Callback<Location> } callback - Indicates the callback for reporting the location result.
105   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
106   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
107   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.on('locationChange')} due to limited device capabilities.
108   * @throws { BusinessError } 3301000 - The location service is unavailable.
109   * @throws { BusinessError } 3301100 - The location switch is off.
110   * @syscap SystemCapability.Location.Location.Core
111   * @atomicservice
112   * @since arkts {'1.1':'18','1.2':'20'}
113   * @arkts 1.1&1.2
114   */
115  function on(type: 'locationChange', request: LocationRequest | ContinuousLocationRequest,
116  callback: Callback<Location>): void;
117
118  /**
119   * Unsubscribe location changed.
120   *
121   * @permission ohos.permission.APPROXIMATELY_LOCATION
122   * @param { 'locationChange' } type - Indicates the location service event to be subscribed to.
123   * @param { Callback<Location> } [callback] - Indicates the callback for reporting the location result.
124   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
125   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
126   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.off('locationChange')} due to limited device capabilities.
127   * @throws { BusinessError } 3301000 - The location service is unavailable.
128   * @throws { BusinessError } 3301100 - The location switch is off.
129   * @throws { BusinessError } 3301200 - Failed to obtain the geographical location.
130   * @syscap SystemCapability.Location.Location.Core
131   * @since 9
132   */
133  /**
134   * Unsubscribe location changed.
135   *
136   * @permission ohos.permission.APPROXIMATELY_LOCATION
137   * @param { 'locationChange' } type - Indicates the location service event to be subscribed to.
138   * @param { Callback<Location> } [callback] - Indicates the callback for reporting the location result.
139   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
140   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
141   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.off('locationChange')} due to limited device capabilities.
142   * @throws { BusinessError } 3301000 - The location service is unavailable.
143   * @throws { BusinessError } 3301100 - The location switch is off.
144   * @throws { BusinessError } 3301200 - Failed to obtain the geographical location.
145   * @syscap SystemCapability.Location.Location.Core
146   * @atomicservice
147   * @since 11
148   */
149  /**
150   * Unsubscribe location changed.
151   *
152   * @permission ohos.permission.APPROXIMATELY_LOCATION
153   * @param { 'locationChange' } type - Indicates the location service event to be subscribed to.
154   * @param { Callback<Location> } [callback] - Indicates the callback for reporting the location result.
155   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
156   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
157   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.off('locationChange')} due to limited device capabilities.
158   * @throws { BusinessError } 3301000 - The location service is unavailable.
159   * @syscap SystemCapability.Location.Location.Core
160   * @atomicservice
161   * @since arkts {'1.1':'18','1.2':'20'}
162   * @arkts 1.1&1.2
163   */
164  function off(type: 'locationChange', callback?: Callback<Location>): void;
165
166  /**
167   * Subscribe continuous location error changed.
168   *
169   * @permission ohos.permission.APPROXIMATELY_LOCATION
170   * @param { 'locationError' } type - Indicates the location service event to be subscribed to.
171   * @param { Callback<LocationError> } callback - Indicates the callback for reporting the continuous location error.
172   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
173   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
174   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.on('locationError')} due to limited device capabilities.
175   * @throws { BusinessError } 3301000 - The location service is unavailable.
176   * @syscap SystemCapability.Location.Location.Core
177   * @atomicservice
178   * @since arkts {'1.1':'12','1.2':'20'}
179   * @arkts 1.1&1.2
180   */
181  function on(type: 'locationError', callback: Callback<LocationError>): void;
182
183  /**
184   * Unsubscribe continuous location error changed.
185   *
186   * @permission ohos.permission.APPROXIMATELY_LOCATION
187   * @param { 'locationError' } type - Indicates the location service event to be subscribed to.
188   * @param { Callback<LocationError> } [callback] - Indicates the callback for reporting the continuous location error.
189   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
190   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
191   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.off('locationError')} due to limited device capabilities.
192   * @throws { BusinessError } 3301000 - The location service is unavailable.
193   * @syscap SystemCapability.Location.Location.Core
194   * @atomicservice
195   * @since arkts {'1.1':'12','1.2':'20'}
196   * @arkts 1.1&1.2
197   */
198  function off(type: 'locationError', callback?: Callback<LocationError>): void;
199
200  /**
201   * Subscribe location switch changed.
202   *
203   * @param { 'locationEnabledChange' } type - Indicates the location service event to be subscribed to.
204   * @param { Callback<boolean> } callback - Indicates the callback for reporting the location switch status.
205   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
206   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.on('locationEnabledChange')} due to limited device capabilities.
207   * @throws { BusinessError } 3301000 - The location service is unavailable.
208   * @syscap SystemCapability.Location.Location.Core
209   * @since arkts {'1.1':'9','1.2':'20'}
210   * @arkts 1.1&1.2
211   */
212  function on(type: 'locationEnabledChange', callback: Callback<boolean>): void;
213
214  /**
215   * Unsubscribe location switch changed.
216   *
217   * @param { 'locationEnabledChange' } type - Indicates the location service event to be subscribed to.
218   * @param { Callback<boolean> } [callback] - Indicates the callback for reporting the location switch status.
219   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
220   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.off('locationEnabledChange')} due to limited device capabilities.
221   * @throws { BusinessError } 3301000 - The location service is unavailable.
222   * @syscap SystemCapability.Location.Location.Core
223   * @since arkts {'1.1':'9','1.2':'20'}
224   * @arkts 1.1&1.2
225   */
226  function off(type: 'locationEnabledChange', callback?: Callback<boolean>): void;
227
228  /**
229   * Subscribe to cache GNSS locations update messages.
230   *
231   * @permission ohos.permission.APPROXIMATELY_LOCATION
232   * @param { 'cachedGnssLocationsChange' } type - Indicates the location service event to be subscribed to.
233   * @param { CachedGnssLocationsRequest } request - Indicates the cached GNSS locations request parameters.
234   * @param { Callback<Array<Location>> } callback - Indicates the callback for reporting the cached GNSS locations.
235   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
236   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
237   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.on('cachedGnssLocationsChange')} due to limited device capabilities.
238   * @throws { BusinessError } 3301000 - The location service is unavailable.
239   * @throws { BusinessError } 3301100 - The location switch is off.
240   * @throws { BusinessError } 3301200 - Failed to obtain the geographical location.
241   * @syscap SystemCapability.Location.Location.Gnss
242   * @since 9
243   */
244  /**
245   * Subscribe to cache GNSS locations update messages.
246   *
247   * @permission ohos.permission.APPROXIMATELY_LOCATION
248   * @param { 'cachedGnssLocationsChange' } type - Indicates the location service event to be subscribed to.
249   * @param { CachedGnssLocationsRequest } request - Indicates the cached GNSS locations request parameters.
250   * @param { Callback<Array<Location>> } callback - Indicates the callback for reporting the cached GNSS locations.
251   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
252   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
253   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.on('cachedGnssLocationsChange')} due to limited device capabilities.
254   * @throws { BusinessError } 3301000 - The location service is unavailable.
255   * @throws { BusinessError } 3301100 - The location switch is off.
256   * @syscap SystemCapability.Location.Location.Gnss
257   * @since arkts {'1.1':'18','1.2':'20'}
258   * @arkts 1.1&1.2
259   */
260  function on(type: 'cachedGnssLocationsChange', request: CachedGnssLocationsRequest, callback: Callback<Array<Location>>): void;
261
262  /**
263   * Unsubscribe to cache GNSS locations update messages.
264   *
265   * @permission ohos.permission.APPROXIMATELY_LOCATION
266   * @param { 'cachedGnssLocationsChange' } type - Indicates the location service event to be subscribed to.
267   * @param { Callback<Array<Location>> } [callback] - Indicates the callback for reporting the cached gnss locations.
268   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
269   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
270   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.off('cachedGnssLocationsChange')} due to limited device capabilities.
271   * @throws { BusinessError } 3301000 - The location service is unavailable.
272   * @throws { BusinessError } 3301100 - The location switch is off.
273   * @throws { BusinessError } 3301200 - Failed to obtain the geographical location.
274   * @syscap SystemCapability.Location.Location.Gnss
275   * @since 9
276   */
277  /**
278   * Unsubscribe to cache GNSS locations update messages.
279   *
280   * @permission ohos.permission.APPROXIMATELY_LOCATION
281   * @param { 'cachedGnssLocationsChange' } type - Indicates the location service event to be subscribed to.
282   * @param { Callback<Array<Location>> } [callback] - Indicates the callback for reporting the cached gnss locations.
283   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
284   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
285   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.off('cachedGnssLocationsChange')} due to limited device capabilities.
286   * @throws { BusinessError } 3301000 - The location service is unavailable.
287   * @throws { BusinessError } 3301100 - The location switch is off.
288   * @syscap SystemCapability.Location.Location.Gnss
289   * @since arkts {'1.1':'18','1.2':'20'}
290   * @arkts 1.1&1.2
291   */
292  function off(type: 'cachedGnssLocationsChange', callback?: Callback<Array<Location>>): void;
293
294  /**
295   * Subscribe satellite status changed.
296   *
297   * @permission ohos.permission.APPROXIMATELY_LOCATION
298   * @param { 'satelliteStatusChange' } type - Indicates the location service event to be subscribed to.
299   * @param { Callback<SatelliteStatusInfo> } callback - Indicates the callback for reporting the satellite status.
300   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
301   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
302   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.on('satelliteStatusChange')} due to limited device capabilities.
303   * @throws { BusinessError } 3301000 - The location service is unavailable.
304   * @throws { BusinessError } 3301100 - The location switch is off.
305   * @syscap SystemCapability.Location.Location.Gnss
306   * @since arkts {'1.1':'9','1.2':'20'}
307   * @arkts 1.1&1.2
308   */
309  function on(type: 'satelliteStatusChange', callback: Callback<SatelliteStatusInfo>): void;
310
311  /**
312   * Unsubscribe satellite status changed.
313   *
314   * @permission ohos.permission.APPROXIMATELY_LOCATION
315   * @param { 'satelliteStatusChange' } type - Indicates the location service event to be subscribed to.
316   * @param { Callback<SatelliteStatusInfo> } [callback] - Indicates the callback for reporting the satellite status.
317   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
318   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
319   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.off('satelliteStatusChange')} due to limited device capabilities.
320   * @throws { BusinessError } 3301000 - The location service is unavailable.
321   * @throws { BusinessError } 3301100 - The location switch is off.
322   * @syscap SystemCapability.Location.Location.Gnss
323   * @since arkts {'1.1':'9','1.2':'20'}
324   * @arkts 1.1&1.2
325   */
326  function off(type: 'satelliteStatusChange', callback?: Callback<SatelliteStatusInfo>): void;
327
328  /**
329   * Subscribe nmea message changed.
330   *
331   * @permission ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION
332   * @param { 'nmeaMessage' } type - Indicates the location service event to be subscribed to.
333   * @param { Callback<string> } callback - Indicates the callback for reporting the nmea message.
334   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
335   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
336   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.on('nmeaMessage')} due to limited device capabilities.
337   * @throws { BusinessError } 3301000 - The location service is unavailable.
338   * @throws { BusinessError } 3301100 - The location switch is off.
339   * @syscap SystemCapability.Location.Location.Gnss
340   * @since arkts {'1.1':'9','1.2':'20'}
341   * @arkts 1.1&1.2
342   */
343  function on(type: 'nmeaMessage', callback: Callback<string>): void;
344
345  /**
346   * Unsubscribe nmea message changed.
347   *
348   * @permission ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION
349   * @param { 'nmeaMessage' } type - Indicates the location service event to be subscribed to.
350   * @param { Callback<string> } [callback] - Indicates the callback for reporting the nmea message.
351   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
352   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
353   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.off('nmeaMessage')} due to limited device capabilities.
354   * @throws { BusinessError } 3301000 - The location service is unavailable.
355   * @throws { BusinessError } 3301100 - The location switch is off.
356   * @syscap SystemCapability.Location.Location.Gnss
357   * @since arkts {'1.1':'9','1.2':'20'}
358   * @arkts 1.1&1.2
359   */
360  function off(type: 'nmeaMessage', callback?: Callback<string>): void;
361
362  /**
363   * Add a geofence and subscribe geofence status changed.
364   *
365   * @permission ohos.permission.APPROXIMATELY_LOCATION
366   * @param { 'gnssFenceStatusChange' } type - Indicates the location service event to be subscribed to.
367   * @param { GeofenceRequest } request - Indicates the Geofence configuration parameters.
368   * @param { WantAgent } want - Indicates which ability to start when the geofence event is triggered.
369   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
370   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
371   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.on('gnssFenceStatusChange')} due to limited device capabilities.
372   * @throws { BusinessError } 3301000 - The location service is unavailable.
373   * @throws { BusinessError } 3301100 - The location switch is off.
374   * @throws { BusinessError } 3301600 - Failed to operate the geofence.
375   * @syscap SystemCapability.Location.Location.Geofence
376   * @since 9
377   */
378  function on(type: 'gnssFenceStatusChange', request: GeofenceRequest, want: WantAgent): void;
379
380  /**
381   * Remove a geofence and unsubscribe geofence status changed.
382   *
383   * @permission ohos.permission.APPROXIMATELY_LOCATION
384   * @param { 'gnssFenceStatusChange' } type - Indicates the location service event to be subscribed to.
385   * @param { GeofenceRequest } request - Indicates the Geofence configuration parameters.
386   * @param { WantAgent } want - Indicates which ability to start when the geofence event is triggered.
387   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
388   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
389   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.off('gnssFenceStatusChange')} due to limited device capabilities.
390   * @throws { BusinessError } 3301000 - The location service is unavailable.
391   * @throws { BusinessError } 3301100 - The location switch is off.
392   * @throws { BusinessError } 3301600 - Failed to operate the geofence.
393   * @syscap SystemCapability.Location.Location.Geofence
394   * @since 9
395   */
396  function off(type: 'gnssFenceStatusChange', request: GeofenceRequest, want: WantAgent): void;
397
398  /**
399   * Registering the callback function for listening to country code changes.
400   *
401   * @param { 'countryCodeChange' } type - Indicates the location service event to be subscribed to.
402   * @param { Callback<CountryCode> } callback - Indicates the callback for reporting country code changes.
403   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
404   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.on('countryCodeChange')} due to limited device capabilities.
405   * @throws { BusinessError } 3301000 - The location service is unavailable.
406   * @throws { BusinessError } 3301500 - Failed to query the area information.
407   * @syscap SystemCapability.Location.Location.Core
408   * @since arkts {'1.1':'9','1.2':'20'}
409   * @arkts 1.1&1.2
410   */
411  function on(type: 'countryCodeChange', callback: Callback<CountryCode>): void;
412
413  /**
414   * Unregistering the callback function for listening to country code changes.
415   *
416   * @param { 'countryCodeChange' } type - Indicates the location service event to be subscribed to.
417   * @param { Callback<CountryCode> } [callback] - Indicates the callback for reporting country code changes.
418   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
419   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.off('countryCodeChange')} due to limited device capabilities.
420   * @throws { BusinessError } 3301000 - The location service is unavailable.
421   * @throws { BusinessError } 3301500 - Failed to query the area information.
422   * @syscap SystemCapability.Location.Location.Core
423   * @since arkts {'1.1':'9','1.2':'20'}
424   * @arkts 1.1&1.2
425   */
426  function off(type: 'countryCodeChange', callback?: Callback<CountryCode>): void;
427
428  /**
429   * Subscribe to changes in WiFi/BT scanning information,
430   * and use the WiFi/BT scanning information for localization.
431   *
432   * @permission ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION
433   * @param { 'locatingRequiredDataChange' } type - Indicates the location service event to be subscribed to.
434   * @param { LocatingRequiredDataConfig } config - Indicates the locating required data configuration parameters.
435   * @param { Callback<Array<LocatingRequiredData>> } [callback] - Indicates the callback for reporting WiFi/BT scan info.
436   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
437   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
438   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
439   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.on('locatingRequiredDataChange')} due to limited device capabilities.
440   * @throws { BusinessError } 3301800 - Failed to start WiFi or Bluetooth scanning.
441   * @syscap SystemCapability.Location.Location.Core
442   * @systemapi
443   * @since arkts {'1.1':'10','1.2':'20'}
444   * @arkts 1.1&1.2
445   */
446  function on(type: 'locatingRequiredDataChange', config: LocatingRequiredDataConfig, callback: Callback<Array<LocatingRequiredData>>): void;
447
448  /**
449   * Stop WiFi/BT scanning and unsubscribe from WiFi/BT scanning information changes.
450   *
451   * @permission ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION
452   * @param { 'locatingRequiredDataChange' } type - Indicates the location service event to be subscribed to.
453   * @param { Callback<Array<LocatingRequiredData>> } [callback] - Indicates the callback for reporting WiFi/BT scan info.
454   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
455   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
456   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
457   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.off('locatingRequiredDataChange')} due to limited device capabilities.
458   * @syscap SystemCapability.Location.Location.Core
459   * @systemapi
460   * @since arkts {'1.1':'10','1.2':'20'}
461   * @arkts 1.1&1.2
462   */
463  function off(type: 'locatingRequiredDataChange', callback?: Callback<Array<LocatingRequiredData>>): void;
464
465  /**
466   * Subscribe location icon status changed.
467   *
468   * @param { 'locationIconStatusChange' } type - Indicates the location service event to be subscribed to.
469   * @param { Callback<LocationIconStatus> } callback - Indicates the callback for reporting the location icon status.
470   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
471   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
472   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.on('locationIconStatusChange')} due to limited device capabilities.
473   * @throws { BusinessError } 3301000 - The location service is unavailable.
474   * @syscap SystemCapability.Location.Location.Core
475   * @systemapi
476   * @since arkts {'1.1':'12','1.2':'20'}
477   * @arkts 1.1&1.2
478   */
479  function on(type: 'locationIconStatusChange', callback: Callback<LocationIconStatus>): void;
480
481  /**
482   * Unsubscribe location icon status changed.
483   *
484   * @param { 'locationIconStatusChange' } type - Indicates the location service event to be subscribed to.
485   * @param { Callback<LocationIconStatus> } [callback] - Indicates the callback for reporting the location icon status.
486   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
487   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
488   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.off('locationIconStatusChange')} due to limited device capabilities.
489   * @throws { BusinessError } 3301000 - The location service is unavailable.
490   * @syscap SystemCapability.Location.Location.Core
491   * @systemapi
492   * @since arkts {'1.1':'12','1.2':'20'}
493   * @arkts 1.1&1.2
494   */
495  function off(type: 'locationIconStatusChange', callback?: Callback<LocationIconStatus>): void;
496
497  /**
498   * Registers and listens to bluetooth scanning results for location services.
499   *
500   * @permission ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION
501   * @param { 'bluetoothScanResultChange' } type - Indicates the location service event to be subscribed to.
502   * @param { Callback<BluetoothScanResult> } callback - Indicates the callback for reporting Bluetooth scan info.
503   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
504   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
505   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.on('bluetoothScanResultChange')} due to limited device capabilities.
506   * @throws { BusinessError } 3301000 - The location service is unavailable.
507   * @throws { BusinessError } 3301100 - The location switch is off.
508   * @syscap SystemCapability.Location.Location.Core
509   * @since arkts {'1.1':'16','1.2':'20'}
510   * @arkts 1.1&1.2
511   */
512  function on(type: 'bluetoothScanResultChange', callback: Callback<BluetoothScanResult>): void;
513
514  /**
515   * Stop bluetooth scanning and unregister to listen to bluetooth scanning result changes.
516   *
517   * @permission ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION
518   * @param { 'bluetoothScanResultChange' } type - Indicates the location service event to be subscribed to.
519   * @param { Callback<BluetoothScanResult> } [callback] - Indicates the callback for reporting Bluetooth scan info.
520   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
521   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
522   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.off('bluetoothScanResultChange')} due to limited device capabilities.
523   * @throws { BusinessError } 3301000 - The location service is unavailable.
524   * @syscap SystemCapability.Location.Location.Core
525   * @since arkts {'1.1':'16','1.2':'20'}
526   * @arkts 1.1&1.2
527   */
528  function off(type: 'bluetoothScanResultChange', callback?: Callback<BluetoothScanResult>): void;
529
530  /**
531   * Obtain current location.
532   *
533   * @permission ohos.permission.APPROXIMATELY_LOCATION
534   * @param { CurrentLocationRequest } request - Indicates the location request parameters.
535   * @param { AsyncCallback<Location> } callback - Indicates the callback for reporting the location result.
536   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
537   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
538   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.getCurrentLocation} due to limited device capabilities.
539   * @throws { BusinessError } 3301000 - The location service is unavailable.
540   * @throws { BusinessError } 3301100 - The location switch is off.
541   * @throws { BusinessError } 3301200 - Failed to obtain the geographical location.
542   * @syscap SystemCapability.Location.Location.Core
543   * @since 9
544   */
545  /**
546   * Obtain current location.
547   *
548   * @permission ohos.permission.APPROXIMATELY_LOCATION
549   * @param { CurrentLocationRequest } request - Indicates the location request parameters.
550   * @param { AsyncCallback<Location> } callback - Indicates the callback for reporting the location result.
551   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
552   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
553   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.getCurrentLocation} due to limited device capabilities.
554   * @throws { BusinessError } 3301000 - The location service is unavailable.
555   * @throws { BusinessError } 3301100 - The location switch is off.
556   * @throws { BusinessError } 3301200 - Failed to obtain the geographical location.
557   * @syscap SystemCapability.Location.Location.Core
558   * @atomicservice
559   * @since 11
560   */
561  /**
562   * Obtain current location.
563   *
564   * @permission ohos.permission.APPROXIMATELY_LOCATION
565   * @param { CurrentLocationRequest | SingleLocationRequest } request - Indicates the location request parameters.
566   * @param { AsyncCallback<Location> } callback - Indicates the callback for reporting the location result.
567   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
568   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
569   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.getCurrentLocation} due to limited device capabilities.
570   * @throws { BusinessError } 3301000 - The location service is unavailable.
571   * @throws { BusinessError } 3301100 - The location switch is off.
572   * @throws { BusinessError } 3301200 - Failed to obtain the geographical location.
573   * @syscap SystemCapability.Location.Location.Core
574   * @atomicservice
575   * @since arkts {'1.1':'12','1.2':'20'}
576   * @arkts 1.1&1.2
577   */
578  function getCurrentLocation(request: CurrentLocationRequest | SingleLocationRequest,
579  callback: AsyncCallback<Location>): void;
580
581  /**
582   * Obtain current location.
583   *
584   * @permission ohos.permission.APPROXIMATELY_LOCATION
585   * @param { AsyncCallback<Location> } callback - Indicates the callback for reporting the location result.
586   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
587   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
588   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.getCurrentLocation} due to limited device capabilities.
589   * @throws { BusinessError } 3301000 - The location service is unavailable.
590   * @throws { BusinessError } 3301100 - The location switch is off.
591   * @throws { BusinessError } 3301200 - Failed to obtain the geographical location.
592   * @syscap SystemCapability.Location.Location.Core
593   * @since 9
594   */
595  /**
596   * Obtain current location.
597   *
598   * @permission ohos.permission.APPROXIMATELY_LOCATION
599   * @param { AsyncCallback<Location> } callback - Indicates the callback for reporting the location result.
600   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
601   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
602   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.getCurrentLocation} due to limited device capabilities.
603   * @throws { BusinessError } 3301000 - The location service is unavailable.
604   * @throws { BusinessError } 3301100 - The location switch is off.
605   * @throws { BusinessError } 3301200 - Failed to obtain the geographical location.
606   * @syscap SystemCapability.Location.Location.Core
607   * @atomicservice
608   * @since arkts {'1.1':'11','1.2':'20'}
609   * @arkts 1.1&1.2
610   */
611  function getCurrentLocation(callback: AsyncCallback<Location>): void;
612
613  /**
614   * Obtain current location.
615   *
616   * @permission ohos.permission.APPROXIMATELY_LOCATION
617   * @param { CurrentLocationRequest } [request] - Indicates the location request parameters.
618   * @returns { Promise<Location> } The promise returned by the function.
619   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
620   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
621   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.getCurrentLocation} due to limited device capabilities.
622   * @throws { BusinessError } 3301000 - The location service is unavailable.
623   * @throws { BusinessError } 3301100 - The location switch is off.
624   * @throws { BusinessError } 3301200 - Failed to obtain the geographical location.
625   * @syscap SystemCapability.Location.Location.Core
626   * @since 9
627   */
628  /**
629   * Obtain current location.
630   *
631   * @permission ohos.permission.APPROXIMATELY_LOCATION
632   * @param { CurrentLocationRequest } [request] - Indicates the location request parameters.
633   * @returns { Promise<Location> } The promise returned by the function.
634   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
635   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
636   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.getCurrentLocation} due to limited device capabilities.
637   * @throws { BusinessError } 3301000 - The location service is unavailable.
638   * @throws { BusinessError } 3301100 - The location switch is off.
639   * @throws { BusinessError } 3301200 - Failed to obtain the geographical location.
640   * @syscap SystemCapability.Location.Location.Core
641   * @atomicservice
642   * @since 11
643   */
644  /**
645   * Obtain current location.
646   *
647   * @permission ohos.permission.APPROXIMATELY_LOCATION
648   * @param { CurrentLocationRequest | SingleLocationRequest } [request] - Indicates the location request parameters.
649   * @returns { Promise<Location> } The promise returned by the function.
650   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
651   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
652   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.getCurrentLocation} due to limited device capabilities.
653   * @throws { BusinessError } 3301000 - The location service is unavailable.
654   * @throws { BusinessError } 3301100 - The location switch is off.
655   * @throws { BusinessError } 3301200 - Failed to obtain the geographical location.
656   * @syscap SystemCapability.Location.Location.Core
657   * @atomicservice
658   * @since arkts {'1.1':'12','1.2':'20'}
659   * @arkts 1.1&1.2
660   */
661  function getCurrentLocation(request?: CurrentLocationRequest | SingleLocationRequest):
662  Promise<Location>;
663
664  /**
665   * Obtain last known location.
666   *
667   * @permission ohos.permission.APPROXIMATELY_LOCATION
668   * @returns { Location } The last known location information.
669   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
670   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.getLastLocation} due to limited device capabilities.
671   * @throws { BusinessError } 3301000 - The location service is unavailable.
672   * @throws { BusinessError } 3301100 - The location switch is off.
673   * @throws { BusinessError } 3301200 - Failed to obtain the geographical location.
674   * @syscap SystemCapability.Location.Location.Core
675   * @since 9
676   */
677  /**
678   * Obtain last known location.
679   *
680   * @permission ohos.permission.APPROXIMATELY_LOCATION
681   * @returns { Location } The last known location information.
682   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
683   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.getLastLocation} due to limited device capabilities.
684   * @throws { BusinessError } 3301000 - The location service is unavailable.
685   * @throws { BusinessError } 3301100 - The location switch is off.
686   * @throws { BusinessError } 3301200 - Failed to obtain the geographical location.
687   * @syscap SystemCapability.Location.Location.Core
688   * @atomicservice
689   * @since arkts {'1.1':'11','1.2':'20'}
690   * @arkts 1.1&1.2
691   */
692  function getLastLocation(): Location;
693
694  /**
695   * Obtain current location switch status.
696   *
697   * @returns { boolean } Returns {@code true} if the location switch on, returns {@code false} otherwise.
698   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.isLocationEnabled} due to limited device capabilities.
699   * @throws { BusinessError } 3301000 - The location service is unavailable.
700   * @syscap SystemCapability.Location.Location.Core
701   * @since 9
702   */
703  /**
704   * Obtain current location switch status.
705   *
706   * @returns { boolean } Returns {@code true} if the location switch on, returns {@code false} otherwise.
707   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.isLocationEnabled} due to limited device capabilities.
708   * @throws { BusinessError } 3301000 - The location service is unavailable.
709   * @syscap SystemCapability.Location.Location.Core
710   * @atomicservice
711   * @since arkts {'1.1':'11','1.2':'20'}
712   * @arkts 1.1&1.2
713   */
714  function isLocationEnabled(): boolean;
715
716  /**
717   * Obtaining the location switch status of a specified user.
718   *
719   * @param { number } userId - Indicates the ID of a specified user.
720   * @returns { boolean } Returns {@code true} if the location switch on, returns {@code false} otherwise.
721   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
722   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.isLocationEnabledByUserId} due to limited device capabilities.
723   * @throws { BusinessError } 3301000 - The location service is unavailable.
724   * @syscap SystemCapability.Location.Location.Core
725   * @systemapi
726   * @since 18
727   */
728  function isLocationEnabledByUserId(userId: number): boolean;
729
730  /**
731   * Enable location switch.
732   *
733   * @permission ohos.permission.MANAGE_SECURE_SETTINGS
734   * @param { AsyncCallback<void> } callback - Indicates the callback for reporting the error message.
735   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
736   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
737   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
738   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.enableLocation} due to limited device capabilities.
739   * @throws { BusinessError } 3301000 - The location service is unavailable.
740   * @syscap SystemCapability.Location.Location.Core
741   * @systemapi
742   * @since 9
743   */
744  /**
745   * Enable location switch.
746   *
747   * @permission ohos.permission.MANAGE_SECURE_SETTINGS and ohos.permission.CONTROL_LOCATION_SWITCH
748   * @param { AsyncCallback<void> } callback - Indicates the callback for reporting the error message.
749   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
750   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
751   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
752   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.enableLocation} due to limited device capabilities.
753   * @throws { BusinessError } 3301000 - The location service is unavailable.
754   * @syscap SystemCapability.Location.Location.Core
755   * @systemapi
756   * @since arkts {'1.1':'20','1.2':'20'}
757   * @arkts 1.1&1.2
758   */
759  function enableLocation(callback: AsyncCallback<void>): void;
760
761  /**
762   * Enable location switch.
763   *
764   * @permission ohos.permission.MANAGE_SECURE_SETTINGS
765   * @returns { Promise<void> } The promise returned by the function.
766   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
767   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
768   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.enableLocation} due to limited device capabilities.
769   * @throws { BusinessError } 3301000 - The location service is unavailable.
770   * @syscap SystemCapability.Location.Location.Core
771   * @systemapi
772   * @since 9
773   */
774  /**
775   * Enable location switch.
776   *
777   * @permission ohos.permission.MANAGE_SECURE_SETTINGS and ohos.permission.CONTROL_LOCATION_SWITCH
778   * @returns { Promise<void> } The promise returned by the function.
779   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
780   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
781   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.enableLocation} due to limited device capabilities.
782   * @throws { BusinessError } 3301000 - The location service is unavailable.
783   * @syscap SystemCapability.Location.Location.Core
784   * @systemapi
785   * @since arkts {'1.1':'20','1.2':'20'}
786   * @arkts 1.1&1.2
787   */
788  function enableLocation(): Promise<void>;
789
790  /**
791   * Turn on the location switch for a specified user.
792   *
793   * @permission ohos.permission.MANAGE_SECURE_SETTINGS and ohos.permission.CONTROL_LOCATION_SWITCH
794   * @param { number } userId - Indicates the ID of a specified user.
795   * @returns { Promise<void> } The promise returned by the function.
796   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
797   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
798   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.enableLocation} due to limited device capabilities.
799   * @throws { BusinessError } 3301000 - The location service is unavailable.
800   * @syscap SystemCapability.Location.Location.Core
801   * @systemapi
802   * @since 18
803   */
804  function enableLocationByUserId(userId: number): Promise<void>;
805
806  /**
807   * Disable location switch.
808   *
809   * @permission ohos.permission.MANAGE_SECURE_SETTINGS
810   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
811   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
812   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.disableLocation} due to limited device capabilities.
813   * @throws { BusinessError } 3301000 - The location service is unavailable.
814   * @syscap SystemCapability.Location.Location.Core
815   * @systemapi
816   * @since 9
817   */
818  /**
819   * Disable location switch.
820   *
821   * @permission ohos.permission.MANAGE_SECURE_SETTINGS and ohos.permission.CONTROL_LOCATION_SWITCH
822   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
823   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
824   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.disableLocation} due to limited device capabilities.
825   * @throws { BusinessError } 3301000 - The location service is unavailable.
826   * @syscap SystemCapability.Location.Location.Core
827   * @systemapi
828   * @since arkts {'1.1':'20','1.2':'20'}
829   * @arkts 1.1&1.2
830   */
831  function disableLocation(): void;
832
833  /**
834   * Turn off the location switch for a specified user.
835   *
836   * @permission ohos.permission.MANAGE_SECURE_SETTINGS and ohos.permission.CONTROL_LOCATION_SWITCH
837   * @param { number } userId - Indicates the ID of a specified user.
838   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
839   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
840   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.enableLocation} due to limited device capabilities.
841   * @throws { BusinessError } 3301000 - The location service is unavailable.
842   * @syscap SystemCapability.Location.Location.Core
843   * @systemapi
844   * @since 18
845   */
846  function disableLocationByUserId(userId: number): void;
847
848  /**
849   * Set the app locating behavior not controlled by the location switch.
850   *
851   * @permission ohos.permission.LOCATION_SWITCH_IGNORED
852   * @param { boolean } isIgnored - True indicates that the location behavior of the app is not controlled by the location switch.
853   *                                Otherwise, it's the opposite.
854   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
855   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
856   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.enableLocation} due to limited device capabilities.
857   * @throws { BusinessError } 3301000 - The location service is unavailable.
858   * @syscap SystemCapability.Location.Location.Core
859   * @systemapi
860   * @since 18
861   */
862  function setLocationSwitchIgnored(isIgnored: boolean): void;
863
864  /**
865   * Obtain address info from location.
866   *
867   * @param { ReverseGeoCodeRequest } request - Indicates the reverse geocode query parameters.
868   * @param { AsyncCallback<Array<GeoAddress>> } callback - Indicates the callback for reporting the address info.
869   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
870   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.getAddressesFromLocation} due to limited device capabilities.
871   * @throws { BusinessError } 3301000 - The location service is unavailable.
872   * @throws { BusinessError } 3301300 - Reverse geocoding query failed.
873   * @syscap SystemCapability.Location.Location.Geocoder
874   * @since arkts {'1.1':'9','1.2':'20'}
875   * @arkts 1.1&1.2
876   */
877  function getAddressesFromLocation(request: ReverseGeoCodeRequest, callback: AsyncCallback<Array<GeoAddress>>): void;
878
879  /**
880   * Obtain address info from location.
881   *
882   * @param { ReverseGeoCodeRequest } request - Indicates the reverse geocode query parameters.
883   * @returns { Promise<Array<GeoAddress>> } The promise returned by the function.
884   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
885   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.getAddressesFromLocation} due to limited device capabilities.
886   * @throws { BusinessError } 3301000 - The location service is unavailable.
887   * @throws { BusinessError } 3301300 - Reverse geocoding query failed.
888   * @syscap SystemCapability.Location.Location.Geocoder
889   * @since arkts {'1.1':'9','1.2':'20'}
890   * @arkts 1.1&1.2
891   */
892  function getAddressesFromLocation(request: ReverseGeoCodeRequest): Promise<Array<GeoAddress>>;
893
894  /**
895   * Obtain latitude and longitude info from location address.
896   *
897   * @param { GeoCodeRequest } request - Indicates the geocode query parameters.
898   * @param { AsyncCallback<Array<GeoAddress>> } callback - Indicates the callback for reporting the latitude and longitude result.
899   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
900   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.getAddressesFromLocationName} due to limited device capabilities.
901   * @throws { BusinessError } 3301000 - The location service is unavailable.
902   * @throws { BusinessError } 3301400 - Geocoding query failed.
903   * @syscap SystemCapability.Location.Location.Geocoder
904   * @since 9
905   */
906  function getAddressesFromLocationName(request: GeoCodeRequest, callback: AsyncCallback<Array<GeoAddress>>): void;
907
908  /**
909   * Obtain latitude and longitude info from location address.
910   *
911   * @param { GeoCodeRequest } request - Indicates the geocode query parameters.
912   * @returns { Promise<Array<GeoAddress>> } The promise returned by the function.
913   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
914   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.getAddressesFromLocationName} due to limited device capabilities.
915   * @throws { BusinessError } 3301000 - The location service is unavailable.
916   * @throws { BusinessError } 3301400 - Geocoding query failed.
917   * @syscap SystemCapability.Location.Location.Geocoder
918   * @since 9
919   */
920  function getAddressesFromLocationName(request: GeoCodeRequest): Promise<Array<GeoAddress>>;
921
922  /**
923   * Obtain geocoding service status.
924   *
925   * @returns { boolean } Returns {@code true} if geocoding service is available, returns {@code false} otherwise.
926   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.isGeocoderAvailable} due to limited device capabilities.
927   * @throws { BusinessError } 3301000 - The location service is unavailable.
928   * @syscap SystemCapability.Location.Location.Geocoder
929   * @since 9
930   */
931  function isGeocoderAvailable(): boolean;
932
933  /**
934   * Obtain the number of cached GNSS locations reported at a time.
935   *
936   * @permission ohos.permission.APPROXIMATELY_LOCATION
937   * @param { AsyncCallback<number> } callback - Indicates the callback for reporting the cached GNSS locations size.
938   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
939   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
940   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.getCachedGnssLocationsSize} due to limited device capabilities.
941   * @throws { BusinessError } 3301000 - The location service is unavailable.
942   * @throws { BusinessError } 3301100 - The location switch is off.
943   * @syscap SystemCapability.Location.Location.Gnss
944   * @since 9
945   */
946  function getCachedGnssLocationsSize(callback: AsyncCallback<number>): void;
947
948  /**
949   * Obtain the number of cached GNSS locations.
950   *
951   * @permission ohos.permission.APPROXIMATELY_LOCATION
952   * @returns { Promise<number> } The promise returned by the function.
953   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
954   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.getCachedGnssLocationsSize} due to limited device capabilities.
955   * @throws { BusinessError } 3301000 - The location service is unavailable.
956   * @throws { BusinessError } 3301100 - The location switch is off.
957   * @syscap SystemCapability.Location.Location.Gnss
958   * @since 9
959   */
960  function getCachedGnssLocationsSize(): Promise<number>;
961
962  /**
963   * All prepared GNSS locations are returned to the application through the callback function,
964   * and the bottom-layer buffer is cleared.
965   *
966   * @permission ohos.permission.APPROXIMATELY_LOCATION
967   * @param { AsyncCallback<void> } callback - Indicates the callback for reporting the error message.
968   * If the function fails to execute, the error message will be carried in the first parameter err of AsyncCallback,
969   * If the function executes successfully, execute the callback function only, no data will be returned.
970   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
971   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
972   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.flushCachedGnssLocations} due to limited device capabilities.
973   * @throws { BusinessError } 3301000 - The location service is unavailable.
974   * @throws { BusinessError } 3301100 - The location switch is off.
975   * @throws { BusinessError } 3301200 - Failed to obtain the geographical location.
976   * @syscap SystemCapability.Location.Location.Gnss
977   * @since 9
978   */
979  function flushCachedGnssLocations(callback: AsyncCallback<void>): void;
980
981  /**
982   * All prepared GNSS locations are returned to the application,
983   * and the bottom-layer buffer is cleared.
984   *
985   * @permission ohos.permission.APPROXIMATELY_LOCATION
986   * @returns { Promise<void> } The promise returned by the function.
987   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
988   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.flushCachedGnssLocations} due to limited device capabilities.
989   * @throws { BusinessError } 3301000 - The location service is unavailable.
990   * @throws { BusinessError } 3301100 - The location switch is off.
991   * @throws { BusinessError } 3301200 - Failed to obtain the geographical location.
992   * @syscap SystemCapability.Location.Location.Gnss
993   * @since 9
994   */
995  function flushCachedGnssLocations(): Promise<void>;
996
997  /**
998   * Send extended commands to location subsystem.
999   *
1000   * @param { LocationCommand } command - Indicates the extended command message body.
1001   * @param { AsyncCallback<void> } callback - Indicates the callback for reporting the error message.
1002   * If the function fails to execute, the error message will be carried in the first parameter err of AsyncCallback,
1003   * If the function executes successfully, execute the callback function only, no data will be returned.
1004   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
1005   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.sendCommand} due to limited device capabilities.
1006   * @throws { BusinessError } 3301000 - The location service is unavailable.
1007   * @syscap SystemCapability.Location.Location.Core
1008   * @since 9
1009   */
1010  function sendCommand(command: LocationCommand, callback: AsyncCallback<void>): void;
1011
1012  /**
1013   * Send extended commands to location subsystem.
1014   *
1015   * @param { LocationCommand } command - Indicates the extended command message body.
1016   * @returns { Promise<void> } The promise returned by the function.
1017   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
1018   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.sendCommand} due to limited device capabilities.
1019   * @throws { BusinessError } 3301000 - The location service is unavailable.
1020   * @syscap SystemCapability.Location.Location.Core
1021   * @since 9
1022   */
1023  function sendCommand(command: LocationCommand): Promise<void>;
1024
1025  /**
1026   * Obtain the current country code.
1027   *
1028   * @param { AsyncCallback<CountryCode> } callback - Indicates the callback for reporting the country code.
1029   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
1030   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.getCountryCode} due to limited device capabilities.
1031   * @throws { BusinessError } 3301000 - The location service is unavailable.
1032   * @throws { BusinessError } 3301500 - Failed to query the area information.
1033   * @syscap SystemCapability.Location.Location.Core
1034   * @since 9
1035   */
1036  function getCountryCode(callback: AsyncCallback<CountryCode>): void;
1037
1038  /**
1039   * Obtain the current country code.
1040   *
1041   * @returns { Promise<CountryCode> } The promise returned by the function.
1042   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.getCountryCode} due to limited device capabilities.
1043   * @throws { BusinessError } 3301000 - The location service is unavailable.
1044   * @throws { BusinessError } 3301500 - Failed to query the area information.
1045   * @syscap SystemCapability.Location.Location.Core
1046   * @since 9
1047   */
1048  function getCountryCode(): Promise<CountryCode>;
1049
1050  /**
1051   * Enable the geographical location simulation function.
1052   *
1053   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1054   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.enableLocationMock} due to limited device capabilities.
1055   * @throws { BusinessError } 3301000 - The location service is unavailable.
1056   * @throws { BusinessError } 3301100 - The location switch is off.
1057   * @syscap SystemCapability.Location.Location.Core
1058   * @systemapi
1059   * @since 9
1060   */
1061  /**
1062   * Enable the geographical location simulation function.
1063   *
1064   * @permission ohos.permission.MOCK_LOCATION
1065   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
1066   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1067   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.enableLocationMock} due to limited device capabilities.
1068   * @throws { BusinessError } 3301000 - The location service is unavailable.
1069   * @throws { BusinessError } 3301100 - The location switch is off.
1070   * @syscap SystemCapability.Location.Location.Core
1071   * @systemapi
1072   * @since 20
1073   */
1074  function enableLocationMock(): void;
1075
1076  /**
1077   * Disable the geographical location simulation function.
1078   *
1079   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1080   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.disableLocationMock} due to limited device capabilities.
1081   * @throws { BusinessError } 3301000 - The location service is unavailable.
1082   * @throws { BusinessError } 3301100 - The location switch is off.
1083   * @syscap SystemCapability.Location.Location.Core
1084   * @systemapi
1085   * @since 9
1086   */
1087  /**
1088   * Disable the geographical location simulation function.
1089   *
1090   * @permission ohos.permission.MOCK_LOCATION
1091   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
1092   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1093   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.disableLocationMock} due to limited device capabilities.
1094   * @throws { BusinessError } 3301000 - The location service is unavailable.
1095   * @throws { BusinessError } 3301100 - The location switch is off.
1096   * @syscap SystemCapability.Location.Location.Core
1097   * @systemapi
1098   * @since 20
1099   */
1100  function disableLocationMock(): void;
1101
1102  /**
1103   * Set the configuration parameters for location simulation.
1104   *
1105   * @param { LocationMockConfig } config - Indicates the configuration parameters for location simulation.
1106   * Contains the array of locations and reporting intervals that need to be simulated.
1107   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1108   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
1109   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.setMockedLocations} due to limited device capabilities.
1110   * @throws { BusinessError } 3301000 - The location service is unavailable.
1111   * @throws { BusinessError } 3301100 - The location switch is off.
1112   * @syscap SystemCapability.Location.Location.Core
1113   * @systemapi
1114   * @since 9
1115   */
1116  /**
1117   * Set the configuration parameters for location simulation.
1118   *
1119   * @permission ohos.permission.MOCK_LOCATION
1120   * @param { LocationMockConfig } config - Indicates the configuration parameters for location simulation.
1121   * Contains the array of locations and reporting intervals that need to be simulated.
1122   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
1123   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1124   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
1125   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.setMockedLocations} due to limited device capabilities.
1126   * @throws { BusinessError } 3301000 - The location service is unavailable.
1127   * @throws { BusinessError } 3301100 - The location switch is off.
1128   * @syscap SystemCapability.Location.Location.Core
1129   * @systemapi
1130   * @since 20
1131   */
1132  function setMockedLocations(config: LocationMockConfig): void;
1133
1134  /**
1135   * Enable the reverse geocoding simulation function.
1136   *
1137   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1138   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.enableReverseGeocodingMock} due to limited device capabilities.
1139   * @throws { BusinessError } 3301000 - The location service is unavailable.
1140   * @syscap SystemCapability.Location.Location.Core
1141   * @systemapi
1142   * @since 9
1143   */
1144  /**
1145   * Enable the reverse geocoding simulation function.
1146   *
1147   * @permission ohos.permission.MOCK_LOCATION
1148   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
1149   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1150   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.enableReverseGeocodingMock} due to limited device capabilities.
1151   * @throws { BusinessError } 3301000 - The location service is unavailable.
1152   * @syscap SystemCapability.Location.Location.Core
1153   * @systemapi
1154   * @since 20
1155   */
1156  function enableReverseGeocodingMock(): void;
1157
1158  /**
1159   * Disable the reverse geocoding simulation function.
1160   *
1161   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1162   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.disableReverseGeocodingMock} due to limited device capabilities.
1163   * @throws { BusinessError } 3301000 - The location service is unavailable.
1164   * @syscap SystemCapability.Location.Location.Core
1165   * @systemapi
1166   * @since 9
1167   */
1168  /**
1169   * Disable the reverse geocoding simulation function.
1170   *
1171   * @permission ohos.permission.MOCK_LOCATION
1172   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
1173   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1174   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.disableReverseGeocodingMock} due to limited device capabilities.
1175   * @throws { BusinessError } 3301000 - The location service is unavailable.
1176   * @syscap SystemCapability.Location.Location.Core
1177   * @systemapi
1178   * @since 20
1179   */
1180  function disableReverseGeocodingMock(): void;
1181
1182  /**
1183   * Set the configuration parameters for simulating reverse geocoding.
1184   *
1185   * @param { Array<ReverseGeocodingMockInfo> } mockInfos - Indicates the set of locations and place names to be simulated.
1186   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1187   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
1188   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.setReverseGeocodingMockInfo} due to limited device capabilities.
1189   * @throws { BusinessError } 3301000 - The location service is unavailable.
1190   * @syscap SystemCapability.Location.Location.Core
1191   * @systemapi
1192   * @since 9
1193   */
1194  /**
1195   * Set the configuration parameters for simulating reverse geocoding.
1196   *
1197   * @permission ohos.permission.MOCK_LOCATION
1198   * @param { Array<ReverseGeocodingMockInfo> } mockInfos - Indicates the set of locations and place names to be simulated.
1199   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
1200   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1201   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
1202   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.setReverseGeocodingMockInfo} due to limited device capabilities.
1203   * @throws { BusinessError } 3301000 - The location service is unavailable.
1204   * @syscap SystemCapability.Location.Location.Core
1205   * @systemapi
1206   * @since 20
1207   */
1208  function setReverseGeocodingMockInfo(mockInfos: Array<ReverseGeocodingMockInfo>): void;
1209
1210  /**
1211   * Querying location privacy protocol confirmation status.
1212   *
1213   * @param { LocationPrivacyType } type - Indicates location privacy protocol type.
1214   * @returns { boolean } Returns {@code true} if the location privacy protocol has been confirmed, returns {@code false} otherwise.
1215   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1216   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
1217   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.isLocationPrivacyConfirmed} due to limited device capabilities.
1218   * @throws { BusinessError } 3301000 - The location service is unavailable.
1219   * @syscap SystemCapability.Location.Location.Core
1220   * @systemapi
1221   * @since arkts {'1.1':'9','1.2':'20'}
1222   * @arkts 1.1&1.2
1223   */
1224  function isLocationPrivacyConfirmed(type: LocationPrivacyType): boolean;
1225
1226  /**
1227   * Set location privacy protocol confirmation status.
1228   *
1229   * @permission ohos.permission.MANAGE_SECURE_SETTINGS
1230   * @param { LocationPrivacyType } type - Indicates location privacy protocol type.
1231   * @param { boolean } isConfirmed - Indicates whether the location privacy protocol has been confirmed.
1232   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
1233   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1234   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
1235   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.setLocationPrivacyConfirmStatus} due to limited device capabilities.
1236   * @throws { BusinessError } 3301000 - The location service is unavailable.
1237   * @syscap SystemCapability.Location.Location.Core
1238   * @systemapi
1239   * @since 9
1240   */
1241  function setLocationPrivacyConfirmStatus(type: LocationPrivacyType, isConfirmed: boolean): void;
1242
1243  /**
1244   * Get WiFi/BT scanning information, and use the WiFi/BT scanning information for localization.
1245   *
1246   * @permission ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION
1247   * @param { LocatingRequiredDataConfig } config - Indicates the request parameters for obtaining the data required for locating.
1248   * @returns { Promise<Array<LocatingRequiredData>> } The promise returned by the function, for reporting WiFi/BT scan info.
1249   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
1250   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1251   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
1252   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.getLocatingRequiredData} due to limited device capabilities.
1253   * @throws { BusinessError } 3301800 - Failed to start WiFi or Bluetooth scanning.
1254   * @syscap SystemCapability.Location.Location.Core
1255   * @systemapi
1256   * @since 10
1257   */
1258  function getLocatingRequiredData(config: LocatingRequiredDataConfig): Promise<Array<LocatingRequiredData>>;
1259
1260  /**
1261   * Add a geofence.
1262   *
1263   * @permission ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION
1264   * @param { GnssGeofenceRequest } fenceRequest - Indicates the Geofence configuration parameters.
1265   * @returns { Promise<number> } The promise returned by the function, for reporting the ID of geofence.
1266   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
1267   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
1268   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.addGnssGeofence} due to limited device capabilities.
1269   * @throws { BusinessError } 3301000 - The location service is unavailable.
1270   * @throws { BusinessError } 3301100 - The location switch is off.
1271   * @throws { BusinessError } 3301601 - The number of geofences exceeds the maximum.
1272   * @syscap SystemCapability.Location.Location.Geofence
1273   * @since 12
1274   */
1275  function addGnssGeofence(fenceRequest: GnssGeofenceRequest): Promise<number>;
1276
1277  /**
1278   * Remove a geofence.
1279   *
1280   * @permission ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION
1281   * @param { number } geofenceId - Indicates the ID of geofence.
1282   * @returns { Promise<void> } The promise returned by the function.
1283   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
1284   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
1285   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.removeGnssGeofence} due to limited device capabilities.
1286   * @throws { BusinessError } 3301000 - The location service is unavailable.
1287   * @throws { BusinessError } 3301602 - Failed to delete a geofence due to an incorrect ID.
1288   * @syscap SystemCapability.Location.Location.Geofence
1289   * @since 12
1290   */
1291  function removeGnssGeofence(geofenceId: number): Promise<void>;
1292
1293  /**
1294   * Obtains the coordinate system types supported by geofence.
1295   *
1296   * @returns { Array<CoordinateSystemType> } Return the coordinate system types supported by geofence.
1297   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.getGeofenceSupportedCoordTypes} due to limited device capabilities.
1298   * @throws { BusinessError } 3301000 - The location service is unavailable.
1299   * @syscap SystemCapability.Location.Location.Geofence
1300   * @since 12
1301   */
1302  function getGeofenceSupportedCoordTypes(): Array<CoordinateSystemType>;
1303
1304  /**
1305   * Get location icon status.
1306   *
1307   * @returns { LocationIconStatus } The location icon status.
1308   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1309   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.getLocationIconStatus} due to limited device capabilities.
1310   * @throws { BusinessError } 3301000 - The location service is unavailable.
1311   * @syscap SystemCapability.Location.Location.Core
1312   * @systemapi
1313   * @since 12
1314   */
1315  function getLocationIconStatus(): LocationIconStatus;
1316
1317  /**
1318   * Obtains the BSSID of the connected Wi-Fi hotspot.
1319   * @permission ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION
1320   * @returns {string} Returns the BSSID of the connected Wi-Fi hotspot.
1321   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
1322   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.getCurrentWifiBssidForLocating()} due to limited device capabilities.
1323   * @throws { BusinessError } 3301000 - The location service is unavailable.
1324   * @throws { BusinessError } 3301100 - The location switch is off.
1325   * @throws { BusinessError } 3301900 - Failed to obtain the BSSID of the Wi-Fi hotspot. The Wi-Fi network is not connected.
1326   * @syscap SystemCapability.Location.Location.Core
1327   * @crossplatform
1328   * @since 14
1329   */
1330  function getCurrentWifiBssidForLocating(): string;
1331
1332  /**
1333   * Obtains the distance between two locations.
1334   *
1335   * @param { Location } location1 - Indicates first location.
1336   * @param { Location } location2 - Indicates second location.
1337   * @returns { number } Returns the distance between two locations.
1338   * @syscap SystemCapability.Location.Location.Core
1339   * @atomicservice
1340   * @since 20
1341   */
1342  function getDistanceBetweenLocations(location1: Location, location2: Location): number;
1343
1344  /**
1345   * Check whether the POI service is supported.
1346   *
1347   * @returns { boolean } Returns {@code true} if POI service is available, returns {@code false} otherwise.
1348   * @syscap SystemCapability.Location.Location.Core
1349   * @atomicservice
1350   * @since 20
1351   */
1352  function isPoiServiceSupported(): boolean;
1353
1354  /**
1355   * Obtaining POI Information.
1356   *
1357   * @permission ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION
1358   * @returns { Promise<PoiInfo> } The promise returned by the function, for reporting POI info.
1359   *
1360   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
1361   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.getPoiInfo} due to limited device capabilities.
1362   * @throws { BusinessError } 3301000 - The location service is unavailable.
1363   * @throws { BusinessError } 3301100 - The location switch is off.
1364   * @syscap SystemCapability.Location.Location.Core
1365   * @atomicservice
1366   * @since 20
1367   */
1368  function getPoiInfo(): Promise<PoiInfo>;
1369
1370  /**
1371   * Add a beacon fence.
1372   *
1373   * @permission ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION
1374   * @param { BeaconFenceRequest } fenceRequest - Indicates the details of the beacon fence.
1375   * @returns { Promise<number> } The promise returned by the function, for reporting the ID of beacon fence.
1376   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the
1377   * permission required to call the API.
1378   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.addBeaconFence}
1379   * due to limited device capabilities.
1380   * @throws { BusinessError } 3501100 - Failed to add a beacon fence because the location switch is off.
1381   * @throws { BusinessError } 3501101 - Failed to add a beacon fence because the bluetooth switch is off.
1382   * @throws { BusinessError } 3501601 - The number of beacon fence exceeds the maximum.
1383   * @throws { BusinessError } 3501603 - Duplicate beacon fence information.
1384   * @syscap SystemCapability.Location.Location.Geofence
1385   * @atomicservice
1386   * @since 20
1387   */
1388  function addBeaconFence(fenceRequest: BeaconFenceRequest): Promise<number>;
1389
1390  /**
1391   * Remove a beacon fence.
1392   *
1393   * @permission ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION
1394   * @param { BeaconFence } [beaconFence] - Indicates the details of the beacon fence.
1395   * @returns { Promise<void> } The promise returned by the function.
1396   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission
1397   * required to call the API.
1398   * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.removeBeaconFence}
1399   * due to limited device capabilities.
1400   * @throws { BusinessError } 3501602 - Failed to delete the fence due to incorrect beacon fence information.
1401   * @syscap SystemCapability.Location.Location.Geofence
1402   * @atomicservice
1403   * @since 20
1404   */
1405  function removeBeaconFence(beaconFence?: BeaconFence): Promise<void>;
1406
1407  /**
1408   * Check whether the BeaconFence service is supported.
1409   *
1410   * @returns { boolean } Returns {@code true} if BeaconFence service is available, returns {@code false} otherwise.
1411   * @syscap SystemCapability.Location.Location.Geofence
1412   * @atomicservice
1413   * @since 20
1414   */
1415  function isBeaconFenceSupported(): boolean;
1416
1417  /**
1418   * Configuration parameters for simulating reverse geocoding.
1419   *
1420   * @typedef ReverseGeocodingMockInfo
1421   * @syscap SystemCapability.Location.Location.Core
1422   * @systemapi
1423   * @since 9
1424   */
1425  export interface ReverseGeocodingMockInfo {
1426    /**
1427     * Location for which reverse geocoding query is required.
1428     *
1429     * @type { ReverseGeoCodeRequest }
1430     * @syscap SystemCapability.Location.Location.Core
1431     * @systemapi
1432     * @since 9
1433     */
1434    location: ReverseGeoCodeRequest;
1435
1436    /**
1437     * Actual address information corresponding to the location.
1438     *
1439     * @type { GeoAddress }
1440     * @syscap SystemCapability.Location.Location.Core
1441     * @systemapi
1442     * @since 9
1443     */
1444    geoAddress: GeoAddress;
1445  }
1446
1447  /**
1448   * Parameters for configuring the location simulation function.
1449   *
1450   * @typedef LocationMockConfig
1451   * @syscap SystemCapability.Location.Location.Core
1452   * @systemapi
1453   * @since 9
1454   */
1455  export interface LocationMockConfig {
1456    /**
1457     * Interval for reporting simulated locations.
1458     *
1459     * @type { number }
1460     * @syscap SystemCapability.Location.Location.Core
1461     * @systemapi
1462     * @since 9
1463     */
1464    timeInterval: number;
1465
1466    /**
1467     * Mock location array.
1468     *
1469     * @type { Array<Location> }
1470     * @syscap SystemCapability.Location.Location.Core
1471     * @systemapi
1472     * @since 9
1473     */
1474    locations: Array<Location>;
1475  }
1476
1477  /**
1478   * Satellite status information.
1479   *
1480   * @typedef SatelliteStatusInfo
1481   * @syscap SystemCapability.Location.Location.Gnss
1482   * @since arkts {'1.1':'9','1.2':'20'}
1483   * @arkts 1.1&1.2
1484   */
1485  export interface SatelliteStatusInfo {
1486    /**
1487     * Number of satellites.
1488     *
1489     * @type { number }
1490     * @syscap SystemCapability.Location.Location.Gnss
1491     * @since arkts {'1.1':'9','1.2':'20'}
1492     * @arkts 1.1&1.2
1493     */
1494    satellitesNumber: number;
1495
1496    /**
1497     * Satellite ID array.
1498     *
1499     * @type { Array<number> }
1500     * @syscap SystemCapability.Location.Location.Gnss
1501     * @since arkts {'1.1':'9','1.2':'20'}
1502     * @arkts 1.1&1.2
1503     */
1504    satelliteIds: Array<number>;
1505
1506    /**
1507     * Carrier to noise density array.
1508     *
1509     * @type { Array<number> }
1510     * @syscap SystemCapability.Location.Location.Gnss
1511     * @since arkts {'1.1':'9','1.2':'20'}
1512     * @arkts 1.1&1.2
1513     */
1514    carrierToNoiseDensitys: Array<number>;
1515
1516    /**
1517     * Satellite altitude array.
1518     *
1519     * @type { Array<number> }
1520     * @syscap SystemCapability.Location.Location.Gnss
1521     * @since arkts {'1.1':'9','1.2':'20'}
1522     * @arkts 1.1&1.2
1523     */
1524    altitudes: Array<number>;
1525
1526    /**
1527     * Satellite azimuth array.
1528     *
1529     * @type { Array<number> }
1530     * @syscap SystemCapability.Location.Location.Gnss
1531     * @since arkts {'1.1':'9','1.2':'20'}
1532     * @arkts 1.1&1.2
1533     */
1534    azimuths: Array<number>;
1535
1536    /**
1537     * Satellite carrier frequency array.
1538     *
1539     * @type { Array<number> }
1540     * @syscap SystemCapability.Location.Location.Gnss
1541     * @since arkts {'1.1':'9','1.2':'20'}
1542     * @arkts 1.1&1.2
1543     */
1544    carrierFrequencies: Array<number>;
1545
1546    /**
1547     * Satellite constellation type array.
1548     *
1549     * @type { ?Array<SatelliteConstellationCategory> }
1550     * @syscap SystemCapability.Location.Location.Gnss
1551     * @since arkts {'1.1':'12','1.2':'20'}
1552     * @arkts 1.1&1.2
1553     */
1554    satelliteConstellation?: Array<SatelliteConstellationCategory>;
1555
1556    /**
1557     * Satellite additional information array.
1558     *
1559     * @type { ?Array<number> }
1560     * @syscap SystemCapability.Location.Location.Gnss
1561     * @since arkts {'1.1':'12','1.2':'20'}
1562     * @arkts 1.1&1.2
1563     */
1564    satelliteAdditionalInfo?: Array<number>;
1565  }
1566
1567  /**
1568   * Parameters for requesting to report cache location information.
1569   *
1570   * @typedef CachedGnssLocationsRequest
1571   * @syscap SystemCapability.Location.Location.Gnss
1572   * @since arkts {'1.1':'9','1.2':'20'}
1573   * @arkts 1.1&1.2
1574   */
1575  export interface CachedGnssLocationsRequest {
1576    /**
1577     * GNSS cache location report period.
1578     *
1579     * @type { number }
1580     * @syscap SystemCapability.Location.Location.Gnss
1581     * @since arkts {'1.1':'9','1.2':'20'}
1582     * @arkts 1.1&1.2
1583     */
1584    reportingPeriodSec: number;
1585
1586    /**
1587     * Indicates whether to wake up the listener when the GNSS cache location queue is full.
1588     *
1589     * @type { boolean }
1590     * @syscap SystemCapability.Location.Location.Gnss
1591     * @since arkts {'1.1':'9','1.2':'20'}
1592     * @arkts 1.1&1.2
1593     */
1594    wakeUpCacheQueueFull: boolean;
1595  }
1596
1597  /**
1598   * Configuring parameters in GNSS geofence requests.
1599   *
1600   * @typedef GnssGeofenceRequest
1601   * @syscap SystemCapability.Location.Location.Geofence
1602   * @since 12
1603   */
1604  export interface GnssGeofenceRequest {
1605    /**
1606     * Circular fence information.
1607     *
1608     * @type { Geofence }
1609     * @syscap SystemCapability.Location.Location.Geofence
1610     * @since 12
1611     */
1612    geofence: Geofence;
1613
1614    /**
1615     * Indicates geofence transition status monitored.
1616     *
1617     * @type { Array<GeofenceTransitionEvent> }
1618     * @syscap SystemCapability.Location.Location.Geofence
1619     * @since 12
1620     */
1621    monitorTransitionEvents: Array<GeofenceTransitionEvent>;
1622
1623    /**
1624     * Indicates the geofence notifications to publish.
1625     *
1626     * @type { ?Array<NotificationRequest> }
1627     * @syscap SystemCapability.Location.Location.Geofence
1628     * @since 12
1629     */
1630    notifications?: Array<NotificationRequest>;
1631
1632    /**
1633     * Indicates the callback for reporting the geofence transition status.
1634     *
1635     * @type { AsyncCallback<GeofenceTransition> }
1636     * @syscap SystemCapability.Location.Location.Geofence
1637     * @since 12
1638     */
1639    geofenceTransitionCallback: AsyncCallback<GeofenceTransition>;
1640  }
1641
1642  /**
1643   * Configuring parameters in geofence requests.
1644   *
1645   * @typedef GeofenceRequest
1646   * @syscap SystemCapability.Location.Location.Geofence
1647   * @since 9
1648   */
1649  export interface GeofenceRequest {
1650    /**
1651     * Indicate the user scenario.
1652     *
1653     * @type { LocationRequestScenario }
1654     * @syscap SystemCapability.Location.Location.Geofence
1655     * @since 9
1656     */
1657    scenario: LocationRequestScenario;
1658
1659    /**
1660     * Circular fence information.
1661     *
1662     * @type { Geofence }
1663     * @syscap SystemCapability.Location.Location.Geofence
1664     * @since 9
1665     */
1666    geofence: Geofence;
1667  }
1668
1669  /**
1670   * Circular fence information.
1671   *
1672   * @typedef Geofence
1673   * @syscap SystemCapability.Location.Location.Geofence
1674   * @since 9
1675   */
1676  export interface Geofence {
1677    /**
1678     * Latitude of the center point of the circular fence.
1679     *
1680     * @type { number }
1681     * @syscap SystemCapability.Location.Location.Geofence
1682     * @since 9
1683     */
1684    latitude: number;
1685
1686    /**
1687     * Longitude of the center point of the circular fence.
1688     *
1689     * @type { number }
1690     * @syscap SystemCapability.Location.Location.Geofence
1691     * @since 9
1692     */
1693    longitude: number;
1694
1695    /**
1696     * Coordinate system type.
1697     *
1698     * @type { ?CoordinateSystemType }
1699     * @syscap SystemCapability.Location.Location.Geofence
1700     * @since 12
1701     */
1702    coordinateSystemType?: CoordinateSystemType;
1703
1704    /**
1705     * Radius of the circular fence.
1706     *
1707     * @type { number }
1708     * @syscap SystemCapability.Location.Location.Geofence
1709     * @since 9
1710     */
1711    radius: number;
1712
1713    /**
1714     * Expiration of the circular fence.
1715     *
1716     * @type { number }
1717     * @syscap SystemCapability.Location.Location.Geofence
1718     * @since 9
1719     */
1720    expiration: number;
1721  }
1722
1723  /**
1724   * Configuring parameters in reverse geocode requests.
1725   *
1726   * @typedef ReverseGeoCodeRequest
1727   * @syscap SystemCapability.Location.Location.Geocoder
1728   * @since arkts {'1.1':'9','1.2':'20'}
1729   * @arkts 1.1&1.2
1730   */
1731  export interface ReverseGeoCodeRequest {
1732    /**
1733     * Indicates the language area information.
1734     *
1735     * @type { ?string }
1736     * @syscap SystemCapability.Location.Location.Geocoder
1737     * @since arkts {'1.1':'9','1.2':'20'}
1738     * @arkts 1.1&1.2
1739     */
1740    locale?: string;
1741
1742    /**
1743     * Indicates the country information.
1744     *
1745     * @type { ?string }
1746     * @syscap SystemCapability.Location.Location.Geocoder
1747     * @since arkts {'1.1':'12','1.2':'20'}
1748     * @arkts 1.1&1.2
1749     */
1750    country?: string;
1751
1752    /**
1753     * Latitude for reverse geocoding query.
1754     *
1755     * @type { number }
1756     * @syscap SystemCapability.Location.Location.Geocoder
1757     * @since arkts {'1.1':'9','1.2':'20'}
1758     * @arkts 1.1&1.2
1759     */
1760    latitude: number;
1761
1762    /**
1763     * Longitude for reverse geocoding query.
1764     *
1765     * @type { number }
1766     * @syscap SystemCapability.Location.Location.Geocoder
1767     * @since arkts {'1.1':'9','1.2':'20'}
1768     * @arkts 1.1&1.2
1769     */
1770    longitude: number;
1771
1772    /**
1773     * Indicates the maximum number of addresses returned by reverse geocoding query.
1774     *
1775     * @type { ?number }
1776     * @syscap SystemCapability.Location.Location.Geocoder
1777     * @since arkts {'1.1':'9','1.2':'20'}
1778     * @arkts 1.1&1.2
1779     */
1780    maxItems?: number;
1781  }
1782
1783  /**
1784   * Configuring parameters in geocode requests.
1785   *
1786   * @typedef GeoCodeRequest
1787   * @syscap SystemCapability.Location.Location.Geocoder
1788   * @since arkts {'1.1':'9','1.2':'20'}
1789   * @arkts 1.1&1.2
1790   */
1791  export interface GeoCodeRequest {
1792    /**
1793     * Indicates the language area information.
1794     *
1795     * @type { ?string }
1796     * @syscap SystemCapability.Location.Location.Geocoder
1797     * @since arkts {'1.1':'9','1.2':'20'}
1798     * @arkts 1.1&1.2
1799     */
1800    locale?: string;
1801
1802    /**
1803     * Indicates the country information.
1804     *
1805     * @type { ?string }
1806     * @syscap SystemCapability.Location.Location.Geocoder
1807     * @since arkts {'1.1':'12','1.2':'20'}
1808     * @arkts 1.1&1.2
1809     */
1810    country?: string;
1811
1812    /**
1813     * Address information.
1814     *
1815     * @type { string }
1816     * @syscap SystemCapability.Location.Location.Geocoder
1817     * @since arkts {'1.1':'9','1.2':'20'}
1818     * @arkts 1.1&1.2
1819     */
1820    description: string;
1821
1822    /**
1823     * Indicates the maximum number of geocode query results.
1824     *
1825     * @type { ?number }
1826     * @syscap SystemCapability.Location.Location.Geocoder
1827     * @since arkts {'1.1':'9','1.2':'20'}
1828     * @arkts 1.1&1.2
1829     */
1830    maxItems?: number;
1831
1832    /**
1833     * Indicates the minimum latitude for geocoding query results.
1834     *
1835     * @type { ?number }
1836     * @syscap SystemCapability.Location.Location.Geocoder
1837     * @since arkts {'1.1':'9','1.2':'20'}
1838     * @arkts 1.1&1.2
1839     */
1840    minLatitude?: number;
1841
1842    /**
1843     * Indicates the minimum longitude for geocoding query results.
1844     *
1845     * @type { ?number }
1846     * @syscap SystemCapability.Location.Location.Geocoder
1847     * @since arkts {'1.1':'9','1.2':'20'}
1848     * @arkts 1.1&1.2
1849     */
1850    minLongitude?: number;
1851
1852    /**
1853     * Indicates the maximum latitude for geocoding query results.
1854     *
1855     * @type { ?number }
1856     * @syscap SystemCapability.Location.Location.Geocoder
1857     * @since arkts {'1.1':'9','1.2':'20'}
1858     * @arkts 1.1&1.2
1859     */
1860    maxLatitude?: number;
1861
1862    /**
1863     * Indicates the maximum longitude for geocoding query results.
1864     *
1865     * @type { ?number }
1866     * @syscap SystemCapability.Location.Location.Geocoder
1867     * @since arkts {'1.1':'9','1.2':'20'}
1868     * @arkts 1.1&1.2
1869     */
1870    maxLongitude?: number;
1871  }
1872
1873  /**
1874   * Data struct describes geographic locations.
1875   *
1876   * @typedef GeoAddress
1877   * @syscap SystemCapability.Location.Location.Geocoder
1878   * @since arkts {'1.1':'9','1.2':'20'}
1879   * @arkts 1.1&1.2
1880   */
1881  export interface GeoAddress {
1882    /**
1883     * Indicates latitude information.
1884     * A positive value indicates north latitude,
1885     * and a negative value indicates south latitude.
1886     *
1887     * @type { ?number }
1888     * @syscap SystemCapability.Location.Location.Geocoder
1889     * @since arkts {'1.1':'9','1.2':'20'}
1890     * @arkts 1.1&1.2
1891     */
1892    latitude?: number;
1893
1894    /**
1895     * Indicates longitude information.
1896     * A positive value indicates east longitude ,
1897     * and a negative value indicates west longitude.
1898     *
1899     * @type { ?number }
1900     * @syscap SystemCapability.Location.Location.Geocoder
1901     * @since arkts {'1.1':'9','1.2':'20'}
1902     * @arkts 1.1&1.2
1903     */
1904    longitude?: number;
1905
1906    /**
1907     * Indicates language used for the location description.
1908     * zh indicates Chinese, and en indicates English.
1909     *
1910     * @type { ?string }
1911     * @syscap SystemCapability.Location.Location.Geocoder
1912     * @since arkts {'1.1':'9','1.2':'20'}
1913     * @arkts 1.1&1.2
1914     */
1915    locale?: string;
1916
1917    /**
1918     * Indicates detailed address information.
1919     *
1920     * @type { ?string }
1921     * @syscap SystemCapability.Location.Location.Geocoder
1922     * @since arkts {'1.1':'9','1.2':'20'}
1923     * @arkts 1.1&1.2
1924     */
1925    placeName?: string;
1926
1927    /**
1928     * Indicates country code.
1929     *
1930     * @type { ?string }
1931     * @syscap SystemCapability.Location.Location.Geocoder
1932     * @since arkts {'1.1':'9','1.2':'20'}
1933     * @arkts 1.1&1.2
1934     */
1935    countryCode?: string;
1936
1937    /**
1938     * Indicates country name.
1939     *
1940     * @type { ?string }
1941     * @syscap SystemCapability.Location.Location.Geocoder
1942     * @since arkts {'1.1':'9','1.2':'20'}
1943     * @arkts 1.1&1.2
1944     */
1945    countryName?: string;
1946
1947    /**
1948     * Indicates administrative region name.
1949     *
1950     * @type { ?string }
1951     * @syscap SystemCapability.Location.Location.Geocoder
1952     * @since arkts {'1.1':'9','1.2':'20'}
1953     * @arkts 1.1&1.2
1954     */
1955    administrativeArea?: string;
1956
1957    /**
1958     * Indicates sub-administrative region name.
1959     *
1960     * @type { ?string }
1961     * @syscap SystemCapability.Location.Location.Geocoder
1962     * @since arkts {'1.1':'9','1.2':'20'}
1963     * @arkts 1.1&1.2
1964     */
1965    subAdministrativeArea?: string;
1966
1967    /**
1968     * Indicates locality information.
1969     *
1970     * @type { ?string }
1971     * @syscap SystemCapability.Location.Location.Geocoder
1972     * @since arkts {'1.1':'9','1.2':'20'}
1973     * @arkts 1.1&1.2
1974     */
1975    locality?: string;
1976
1977    /**
1978     * Indicates sub-locality information.
1979     *
1980     * @type { ?string }
1981     * @syscap SystemCapability.Location.Location.Geocoder
1982     * @since arkts {'1.1':'9','1.2':'20'}
1983     * @arkts 1.1&1.2
1984     */
1985    subLocality?: string;
1986
1987    /**
1988     * Indicates road name.
1989     *
1990     * @type { ?string }
1991     * @syscap SystemCapability.Location.Location.Geocoder
1992     * @since arkts {'1.1':'9','1.2':'20'}
1993     * @arkts 1.1&1.2
1994     */
1995    roadName?: string;
1996
1997    /**
1998     * Indicates auxiliary road information.
1999     *
2000     * @type { ?string }
2001     * @syscap SystemCapability.Location.Location.Geocoder
2002     * @since arkts {'1.1':'9','1.2':'20'}
2003     * @arkts 1.1&1.2
2004     */
2005    subRoadName?: string;
2006
2007    /**
2008     * Indicates house information.
2009     *
2010     * @type { ?string }
2011     * @syscap SystemCapability.Location.Location.Geocoder
2012     * @since arkts {'1.1':'9','1.2':'20'}
2013     * @arkts 1.1&1.2
2014     */
2015    premises?: string;
2016
2017    /**
2018     * Indicates postal code.
2019     *
2020     * @type { ?string }
2021     * @syscap SystemCapability.Location.Location.Geocoder
2022     * @since arkts {'1.1':'9','1.2':'20'}
2023     * @arkts 1.1&1.2
2024     */
2025    postalCode?: string;
2026
2027    /**
2028     * Indicates phone number.
2029     *
2030     * @type { ?string }
2031     * @syscap SystemCapability.Location.Location.Geocoder
2032     * @since arkts {'1.1':'9','1.2':'20'}
2033     * @arkts 1.1&1.2
2034     */
2035    phoneNumber?: string;
2036
2037    /**
2038     * Indicates website URL.
2039     *
2040     * @type { ?string }
2041     * @syscap SystemCapability.Location.Location.Geocoder
2042     * @since arkts {'1.1':'9','1.2':'20'}
2043     * @arkts 1.1&1.2
2044     */
2045    addressUrl?: string;
2046
2047    /**
2048     * Indicates additional information.
2049     *
2050     * @type { ?Array<string> }
2051     * @syscap SystemCapability.Location.Location.Geocoder
2052     * @since arkts {'1.1':'9','1.2':'20'}
2053     * @arkts 1.1&1.2
2054     */
2055    descriptions?: Array<string>;
2056
2057    /**
2058     * Indicates the amount of additional descriptive information.
2059     *
2060     * @type { ?number }
2061     * @syscap SystemCapability.Location.Location.Geocoder
2062     * @since arkts {'1.1':'9','1.2':'20'}
2063     * @arkts 1.1&1.2
2064     */
2065    descriptionsSize?: number;
2066
2067    /**
2068     * Indicates whether it is an mock GeoAddress
2069     *
2070     * @type { ?Boolean }
2071     * @syscap SystemCapability.Location.Location.Geocoder
2072     * @systemapi
2073     * @since arkts {'1.1':'9','1.2':'20'}
2074     * @arkts 1.1&1.2
2075     */
2076    isFromMock?: Boolean;
2077  }
2078
2079  /**
2080   * Configuring parameters in location requests.
2081   *
2082   * @typedef LocationRequest
2083   * @syscap SystemCapability.Location.Location.Core
2084   * @since 9
2085   */
2086  /**
2087   * Configuring parameters in location requests.
2088   *
2089   * @typedef LocationRequest
2090   * @syscap SystemCapability.Location.Location.Core
2091   * @atomicservice
2092   * @since arkts {'1.1':'11','1.2':'20'}
2093   * @arkts 1.1&1.2
2094   */
2095  export interface LocationRequest {
2096    /**
2097     * Priority of the location request.
2098     *
2099     * @type { ?LocationRequestPriority }
2100     * @syscap SystemCapability.Location.Location.Core
2101     * @since 9
2102     */
2103    /**
2104     * Priority of the location request.
2105     *
2106     * @type { ?LocationRequestPriority }
2107     * @syscap SystemCapability.Location.Location.Core
2108     * @atomicservice
2109     * @since arkts {'1.1':'11','1.2':'20'}
2110     * @arkts 1.1&1.2
2111     */
2112    priority?: LocationRequestPriority;
2113
2114    /**
2115     * User scenario of the location request.
2116     *
2117     * @type { ?LocationRequestScenario }
2118     * @syscap SystemCapability.Location.Location.Core
2119     * @since 9
2120     */
2121    /**
2122     * User scenario of the location request.
2123     *
2124     * @type { ?LocationRequestScenario }
2125     * @syscap SystemCapability.Location.Location.Core
2126     * @atomicservice
2127     * @since arkts {'1.1':'11','1.2':'20'}
2128     * @arkts 1.1&1.2
2129     */
2130    scenario?: LocationRequestScenario;
2131
2132    /**
2133     * Location report interval.
2134     *
2135     * @type { ?number }
2136     * @syscap SystemCapability.Location.Location.Core
2137     * @since 9
2138     */
2139    /**
2140     * Location report interval.
2141     *
2142     * @type { ?number }
2143     * @syscap SystemCapability.Location.Location.Core
2144     * @atomicservice
2145     * @since arkts {'1.1':'11','1.2':'20'}
2146     * @arkts 1.1&1.2
2147     */
2148    timeInterval?: number;
2149
2150    /**
2151     * Location report distance interval.
2152     *
2153     * @type { ?number }
2154     * @syscap SystemCapability.Location.Location.Core
2155     * @since 9
2156     */
2157    /**
2158     * Location report distance interval.
2159     *
2160     * @type { ?number }
2161     * @syscap SystemCapability.Location.Location.Core
2162     * @atomicservice
2163     * @since arkts {'1.1':'11','1.2':'20'}
2164     * @arkts 1.1&1.2
2165     */
2166    distanceInterval?: number;
2167
2168    /**
2169     * Accuracy requirements for reporting locations.
2170     *
2171     * @type { ?number }
2172     * @syscap SystemCapability.Location.Location.Core
2173     * @since 9
2174     */
2175    /**
2176     * Accuracy requirements for reporting locations.
2177     *
2178     * @type { ?number }
2179     * @syscap SystemCapability.Location.Location.Core
2180     * @atomicservice
2181     * @since arkts {'1.1':'11','1.2':'20'}
2182     * @arkts 1.1&1.2
2183     */
2184    maxAccuracy?: number;
2185  }
2186
2187  /**
2188   * Configuring parameters in current location requests.
2189   *
2190   * @typedef CurrentLocationRequest
2191   * @syscap SystemCapability.Location.Location.Core
2192   * @since 9
2193   */
2194  /**
2195   * Configuring parameters in current location requests.
2196   *
2197   * @typedef CurrentLocationRequest
2198   * @syscap SystemCapability.Location.Location.Core
2199   * @atomicservice
2200   * @since arkts {'1.1':'11','1.2':'20'}
2201   * @arkts 1.1&1.2
2202   */
2203  export interface CurrentLocationRequest {
2204    /**
2205     * Priority of the location request.
2206     *
2207     * @type { ?LocationRequestPriority }
2208     * @syscap SystemCapability.Location.Location.Core
2209     * @since 9
2210     */
2211    /**
2212     * Priority of the location request.
2213     *
2214     * @type { ?LocationRequestPriority }
2215     * @syscap SystemCapability.Location.Location.Core
2216     * @atomicservice
2217     * @since arkts {'1.1':'11','1.2':'20'}
2218     * @arkts 1.1&1.2
2219     */
2220    priority?: LocationRequestPriority;
2221
2222    /**
2223     * User scenario of the location request.
2224     *
2225     * @type { ?LocationRequestScenario }
2226     * @syscap SystemCapability.Location.Location.Core
2227     * @since 9
2228     */
2229    /**
2230     * User scenario of the location request.
2231     *
2232     * @type { ?LocationRequestScenario }
2233     * @syscap SystemCapability.Location.Location.Core
2234     * @atomicservice
2235     * @since arkts {'1.1':'11','1.2':'20'}
2236     * @arkts 1.1&1.2
2237     */
2238    scenario?: LocationRequestScenario;
2239
2240    /**
2241     * Accuracy requirements for reporting locations.
2242     *
2243     * @type { ?number }
2244     * @syscap SystemCapability.Location.Location.Core
2245     * @since 9
2246     */
2247    /**
2248     * Accuracy requirements for reporting locations.
2249     *
2250     * @type { ?number }
2251     * @syscap SystemCapability.Location.Location.Core
2252     * @atomicservice
2253     * @since arkts {'1.1':'11','1.2':'20'}
2254     * @arkts 1.1&1.2
2255     */
2256    maxAccuracy?: number;
2257
2258    /**
2259     * Timeout interval of a single location request.
2260     *
2261     * @type { ?number }
2262     * @syscap SystemCapability.Location.Location.Core
2263     * @since 9
2264     */
2265    /**
2266     * Timeout interval of a single location request.
2267     *
2268     * @type { ?number }
2269     * @syscap SystemCapability.Location.Location.Core
2270     * @atomicservice
2271     * @since arkts {'1.1':'11','1.2':'20'}
2272     * @arkts 1.1&1.2
2273     */
2274    timeoutMs?: number;
2275  }
2276
2277  /**
2278   * Geofence transition status.
2279   *
2280   * @typedef GeofenceTransition
2281   * @syscap SystemCapability.Location.Location.Geofence
2282   * @since 12
2283   */
2284  export interface GeofenceTransition {
2285    /**
2286     * ID of the geofence.
2287     *
2288     * @type { number }
2289     * @syscap SystemCapability.Location.Location.Geofence
2290     * @since 12
2291     */
2292    geofenceId: number;
2293
2294    /**
2295     * Indicates the geofence transition status.
2296     *
2297     * @type { GeofenceTransitionEvent }
2298     * @syscap SystemCapability.Location.Location.Geofence
2299     * @since 12
2300     */
2301    transitionEvent: GeofenceTransitionEvent;
2302
2303    /**
2304     * Indicate the beaconFence which transitionEvent occurs.
2305     *
2306     * @type { ?BeaconFence }
2307     * @syscap SystemCapability.Location.Location.Geofence
2308     * @since 20
2309     */
2310    beaconFence?: BeaconFence;
2311  }
2312
2313  /**
2314   * Configuring parameters in continuous location requests.
2315   *
2316   * @typedef ContinuousLocationRequest
2317   * @syscap SystemCapability.Location.Location.Core
2318   * @atomicservice
2319   * @since arkts {'1.1':'12','1.2':'20'}
2320   * @arkts 1.1&1.2
2321   */
2322  export interface ContinuousLocationRequest {
2323    /**
2324     * Location report interval, in seconds.
2325     *
2326     * @type { number }
2327     * @syscap SystemCapability.Location.Location.Core
2328     * @atomicservice
2329     * @since arkts {'1.1':'12','1.2':'20'}
2330     * @arkts 1.1&1.2
2331     */
2332    interval: number;
2333
2334    /**
2335     * Location scenario. You can select a user activity scenario or power consumption scenario.
2336     *
2337     * @type { UserActivityScenario | PowerConsumptionScenario }
2338     * @syscap SystemCapability.Location.Location.Core
2339     * @atomicservice
2340     * @since arkts {'1.1':'12','1.2':'20'}
2341     * @arkts 1.1&1.2
2342     */
2343    locationScenario: UserActivityScenario | PowerConsumptionScenario;
2344
2345    /**
2346     * Indicates the type of sports.
2347     * This parameter is valid only when locationScenario is set to UserActivityScenario.SPORT.
2348     *
2349     * @type { SportsType }
2350     * @syscap SystemCapability.Location.Location.Core
2351     * @systemapi
2352     * @atomicservice
2353     * @since arkts {'1.1':'18','1.2':'20'}
2354     * @arkts 1.1&1.2
2355     */
2356    sportsType?: SportsType;
2357
2358    /**
2359     * Indicates whether to obtain POI information near the current location.
2360     *
2361     * @type { ?boolean }
2362     * @syscap SystemCapability.Location.Location.Core
2363     * @atomicservice
2364     * @since 19
2365     */
2366    needPoi?: boolean;
2367  }
2368
2369  /**
2370   * Configuring parameters in single location requests.
2371   *
2372   * @typedef SingleLocationRequest
2373   * @syscap SystemCapability.Location.Location.Core
2374   * @atomicservice
2375   * @since arkts {'1.1':'12','1.2':'20'}
2376   * @arkts 1.1&1.2
2377   */
2378  export interface SingleLocationRequest {
2379    /**
2380     * Priority of the location request.
2381     *
2382     * @type { LocatingPriority }
2383     * @syscap SystemCapability.Location.Location.Core
2384     * @atomicservice
2385     * @since arkts {'1.1':'12','1.2':'20'}
2386     * @arkts 1.1&1.2
2387     */
2388    locatingPriority: LocatingPriority;
2389
2390    /**
2391     * Timeout of a single location request, in milliseconds.
2392     *
2393     * @type { number }
2394     * @syscap SystemCapability.Location.Location.Core
2395     * @atomicservice
2396     * @since arkts {'1.1':'12','1.2':'20'}
2397     * @arkts 1.1&1.2
2398     */
2399    locatingTimeoutMs: number;
2400
2401    /**
2402     * Indicates whether to obtain POI information near the current location.
2403     *
2404     * @type { ?boolean }
2405     * @syscap SystemCapability.Location.Location.Core
2406     * @atomicservice
2407     * @since 19
2408     */
2409    needPoi?: boolean;
2410  }
2411
2412  /**
2413   * Provides information about geographic locations.
2414   *
2415   * @typedef Location
2416   * @syscap SystemCapability.Location.Location.Core
2417   * @since 9
2418   */
2419  /**
2420   * Provides information about geographic locations.
2421   *
2422   * @typedef Location
2423   * @syscap SystemCapability.Location.Location.Core
2424   * @atomicservice
2425   * @since arkts {'1.1':'11','1.2':'20'}
2426   * @arkts 1.1&1.2
2427   */
2428  export interface Location {
2429    /**
2430     * Indicates latitude information.
2431     * A positive value indicates north latitude,
2432     * and a negative value indicates south latitude.
2433     *
2434     * @type { number }
2435     * @syscap SystemCapability.Location.Location.Core
2436     * @since 9
2437     */
2438    /**
2439     * Indicates latitude information.
2440     * A positive value indicates north latitude,
2441     * and a negative value indicates south latitude.
2442     *
2443     * @type { number }
2444     * @syscap SystemCapability.Location.Location.Core
2445     * @atomicservice
2446     * @since arkts {'1.1':'11','1.2':'20'}
2447     * @arkts 1.1&1.2
2448     */
2449    latitude: number;
2450
2451    /**
2452     * Indicates Longitude information.
2453     * A positive value indicates east longitude ,
2454     * and a negative value indicates west longitude.
2455     *
2456     * @type { number }
2457     * @syscap SystemCapability.Location.Location.Core
2458     * @since 9
2459     */
2460    /**
2461     * Indicates Longitude information.
2462     * A positive value indicates east longitude ,
2463     * and a negative value indicates west longitude.
2464     *
2465     * @type { number }
2466     * @syscap SystemCapability.Location.Location.Core
2467     * @atomicservice
2468     * @since arkts {'1.1':'11','1.2':'20'}
2469     * @arkts 1.1&1.2
2470     */
2471    longitude: number;
2472
2473    /**
2474     * Indicates location altitude, in meters.
2475     *
2476     * @type { number }
2477     * @syscap SystemCapability.Location.Location.Core
2478     * @since 9
2479     */
2480    /**
2481     * Indicates location altitude, in meters.
2482     *
2483     * @type { number }
2484     * @syscap SystemCapability.Location.Location.Core
2485     * @atomicservice
2486     * @since arkts {'1.1':'11','1.2':'20'}
2487     * @arkts 1.1&1.2
2488     */
2489    altitude: number;
2490
2491    /**
2492     * Indicates location accuracy, in meters.
2493     *
2494     * @type { number }
2495     * @syscap SystemCapability.Location.Location.Core
2496     * @since 9
2497     */
2498    /**
2499     * Indicates location accuracy, in meters.
2500     *
2501     * @type { number }
2502     * @syscap SystemCapability.Location.Location.Core
2503     * @atomicservice
2504     * @since arkts {'1.1':'11','1.2':'20'}
2505     * @arkts 1.1&1.2
2506     */
2507    accuracy: number;
2508
2509    /**
2510     * Indicates speed, in m/s.
2511     *
2512     * @type { number }
2513     * @syscap SystemCapability.Location.Location.Core
2514     * @since 9
2515     */
2516    /**
2517     * Indicates speed, in m/s.
2518     *
2519     * @type { number }
2520     * @syscap SystemCapability.Location.Location.Core
2521     * @atomicservice
2522     * @since arkts {'1.1':'11','1.2':'20'}
2523     * @arkts 1.1&1.2
2524     */
2525    speed: number;
2526
2527    /**
2528     * Indicates location timestamp in the UTC format.
2529     *
2530     * @type { number }
2531     * @syscap SystemCapability.Location.Location.Core
2532     * @since 9
2533     */
2534    /**
2535     * Indicates location timestamp in the UTC format.
2536     *
2537     * @type { number }
2538     * @syscap SystemCapability.Location.Location.Core
2539     * @atomicservice
2540     * @since arkts {'1.1':'11','1.2':'20'}
2541     * @arkts 1.1&1.2
2542     */
2543    timeStamp: number;
2544
2545    /**
2546     * Indicates direction information.
2547     *
2548     * @type { number }
2549     * @syscap SystemCapability.Location.Location.Core
2550     * @since 9
2551     */
2552    /**
2553     * Indicates direction information.
2554     *
2555     * @type { number }
2556     * @syscap SystemCapability.Location.Location.Core
2557     * @atomicservice
2558     * @since arkts {'1.1':'11','1.2':'20'}
2559     * @arkts 1.1&1.2
2560     */
2561    direction: number;
2562
2563    /**
2564     * Indicates location timestamp since boot.
2565     *
2566     * @type { number }
2567     * @syscap SystemCapability.Location.Location.Core
2568     * @since 9
2569     */
2570    /**
2571     * Indicates location timestamp since boot.
2572     *
2573     * @type { number }
2574     * @syscap SystemCapability.Location.Location.Core
2575     * @atomicservice
2576     * @since arkts {'1.1':'11','1.2':'20'}
2577     * @arkts 1.1&1.2
2578     */
2579    timeSinceBoot: number;
2580
2581    /**
2582     * Indicates additional information.
2583     *
2584     * @type { ?Array<string> }
2585     * @syscap SystemCapability.Location.Location.Core
2586     * @since 9
2587     */
2588    /**
2589     * Indicates additional information.
2590     *
2591     * @type { ?Array<string> }
2592     * @syscap SystemCapability.Location.Location.Core
2593     * @atomicservice
2594     * @since arkts {'1.1':'11','1.2':'20'}
2595     * @arkts 1.1&1.2
2596     */
2597    additions?: Array<string>;
2598
2599    /**
2600     * Indicates additional information map.
2601     *
2602     * @type { ?Map<string, string> }
2603     * @syscap SystemCapability.Location.Location.Core
2604     * @atomicservice
2605     * @since arkts {'1.1':'12','1.2':'20'}
2606     * @arkts 1.1&1.2
2607     */
2608    additionsMap?: Map<string, string>;
2609
2610    /**
2611     * Indicates the amount of additional descriptive information.
2612     *
2613     * @type { ?number }
2614     * @syscap SystemCapability.Location.Location.Core
2615     * @since 9
2616     */
2617    /**
2618     * Indicates the amount of additional descriptive information.
2619     *
2620     * @type { ?number }
2621     * @syscap SystemCapability.Location.Location.Core
2622     * @atomicservice
2623     * @since arkts {'1.1':'11','1.2':'20'}
2624     * @arkts 1.1&1.2
2625     */
2626    additionSize?: number;
2627
2628    /**
2629     * Indicates whether it is an mock location.
2630     *
2631     * @type { ?Boolean }
2632     * @syscap SystemCapability.Location.Location.Core
2633     * @systemapi
2634     * @since arkts {'1.1':'9','1.2':'20'}
2635     * @arkts 1.1&1.2
2636     */
2637    isFromMock?: Boolean;
2638
2639    /**
2640     * Indicates vertical position accuracy in meters.
2641     *
2642     * @type { ?number }
2643     * @syscap SystemCapability.Location.Location.Core
2644     * @atomicservice
2645     * @since arkts {'1.1':'12','1.2':'20'}
2646     * @arkts 1.1&1.2
2647     */
2648    altitudeAccuracy?: number;
2649
2650    /**
2651     * Indicates speed accuracy in meter per seconds.
2652     *
2653     * @type { ?number }
2654     * @syscap SystemCapability.Location.Location.Core
2655     * @atomicservice
2656     * @since arkts {'1.1':'12','1.2':'20'}
2657     * @arkts 1.1&1.2
2658     */
2659    speedAccuracy?: number;
2660
2661    /**
2662     * Indicates direction accuracy in degrees.
2663     *
2664     * @type { ?number }
2665     * @syscap SystemCapability.Location.Location.Core
2666     * @atomicservice
2667     * @since arkts {'1.1':'12','1.2':'20'}
2668     * @arkts 1.1&1.2
2669     */
2670    directionAccuracy?: number;
2671
2672    /**
2673     * Time uncertainty Of timeSinceBoot in nanosecond.
2674     *
2675     * @type { ?number }
2676     * @syscap SystemCapability.Location.Location.Core
2677     * @atomicservice
2678     * @since arkts {'1.1':'12','1.2':'20'}
2679     * @arkts 1.1&1.2
2680     */
2681    uncertaintyOfTimeSinceBoot?: number;
2682
2683    /**
2684     * Indicates the source of the location.
2685     *
2686     * @type { ?LocationSourceType }
2687     * @syscap SystemCapability.Location.Location.Core
2688     * @atomicservice
2689     * @since arkts {'1.1':'12','1.2':'20'}
2690     * @arkts 1.1&1.2
2691     */
2692    sourceType?: LocationSourceType;
2693
2694    /**
2695     * Indicates the poi information.
2696     *
2697     * @type { ?PoiInfo }
2698     * @syscap SystemCapability.Location.Location.Core
2699     * @atomicservice
2700     * @since 19
2701     */
2702    poi?: PoiInfo;
2703  }
2704
2705  /**
2706   * Describes the request parameters for obtaining the data required for locating.
2707   * @typedef LocatingRequiredDataConfig
2708   * @syscap SystemCapability.Location.Location.Core
2709   * @systemapi
2710   * @since arkts {'1.1':'10','1.2':'20'}
2711   * @arkts 1.1&1.2
2712   */
2713  export interface LocatingRequiredDataConfig {
2714    /**
2715     * Indicates the type of locating required data.
2716     *
2717     * @type {LocatingRequiredDataType}
2718     * @syscap SystemCapability.Location.Location.Core
2719     * @systemapi
2720     * @since arkts {'1.1':'10','1.2':'20'}
2721     * @arkts 1.1&1.2
2722     */
2723    type: LocatingRequiredDataType;
2724
2725    /**
2726     * Indicates whether to start scanning.
2727     *
2728     * @type {boolean}
2729     * @syscap SystemCapability.Location.Location.Core
2730     * @systemapi
2731     * @since arkts {'1.1':'10','1.2':'20'}
2732     * @arkts 1.1&1.2
2733     */
2734    needStartScan: boolean;
2735
2736    /**
2737     * Indicates the interval between scans. The unit is millisecond.
2738     * This parameter needs to be set only when scanning information is continuously monitored.
2739     *
2740     * @type {?number}
2741     * @syscap SystemCapability.Location.Location.Core
2742     * @systemapi
2743     * @since arkts {'1.1':'10','1.2':'20'}
2744     * @arkts 1.1&1.2
2745     */
2746    scanInterval?: number;
2747
2748    /**
2749     * Indicates the timeout period of a single scan. The unit is millisecond. The default value is 10000.
2750     * This parameter needs to be set only when getLocatingRequiredData is used.
2751     *
2752     * @type {?number}
2753     * @syscap SystemCapability.Location.Location.Core
2754     * @systemapi
2755     * @since arkts {'1.1':'10','1.2':'20'}
2756     * @arkts 1.1&1.2
2757     */
2758    scanTimeout?: number;
2759  }
2760
2761  /**
2762   * Describes the structure of the data required for locating.
2763   * @typedef LocatingRequiredData
2764   * @syscap SystemCapability.Location.Location.Core
2765   * @systemapi
2766   * @since arkts {'1.1':'10','1.2':'20'}
2767   * @arkts 1.1&1.2
2768   */
2769  export interface LocatingRequiredData {
2770    /**
2771     * WiFi scan info.
2772     *
2773     * @type {?WifiScanInfo}
2774     * @syscap SystemCapability.Location.Location.Core
2775     * @systemapi
2776     * @since arkts {'1.1':'10','1.2':'20'}
2777     * @arkts 1.1&1.2
2778     */
2779    wifiData?: WifiScanInfo;
2780
2781    /**
2782     * Bluetooth scan info.
2783     *
2784     * @type {?BluetoothScanInfo}
2785     * @syscap SystemCapability.Location.Location.Core
2786     * @systemapi
2787     * @since arkts {'1.1':'10','1.2':'20'}
2788     * @arkts 1.1&1.2
2789     */
2790    bluetoothData?: BluetoothScanInfo;
2791  }
2792
2793  /**
2794   * Describes the scanned WiFi information.
2795   * @typedef WifiScanInfo
2796   * @syscap SystemCapability.Location.Location.Core
2797   * @systemapi
2798   * @since arkts {'1.1':'10','1.2':'20'}
2799   * @arkts 1.1&1.2
2800   */
2801  export interface WifiScanInfo {
2802    /**
2803     * WiFi SSID: the maximum length is 32.
2804     *
2805     * @type {string}
2806     * @syscap SystemCapability.Location.Location.Core
2807     * @systemapi
2808     * @since arkts {'1.1':'10','1.2':'20'}
2809     * @arkts 1.1&1.2
2810     */
2811    ssid: string;
2812
2813    /**
2814     * WiFi bssid(MAC): the length is 6.
2815     *
2816     * @type {string}
2817     * @syscap SystemCapability.Location.Location.Core
2818     * @systemapi
2819     * @since arkts {'1.1':'10','1.2':'20'}
2820     * @arkts 1.1&1.2
2821     */
2822    bssid: string;
2823
2824    /**
2825     * Received signal strength indicator (RSSI).
2826     *
2827     * @type {number}
2828     * @syscap SystemCapability.Location.Location.Core
2829     * @systemapi
2830     * @since arkts {'1.1':'10','1.2':'20'}
2831     * @arkts 1.1&1.2
2832     */
2833    rssi: number;
2834
2835    /**
2836     * Frequency
2837     *
2838     * @type {number}
2839     * @syscap SystemCapability.Location.Location.Core
2840     * @systemapi
2841     * @since arkts {'1.1':'10','1.2':'20'}
2842     * @arkts 1.1&1.2
2843     */
2844    frequency: number;
2845
2846    /**
2847     * Time stamp.
2848     *
2849     * @type {number}
2850     * @syscap SystemCapability.Location.Location.Core
2851     * @systemapi
2852     * @since arkts {'1.1':'10','1.2':'20'}
2853     * @arkts 1.1&1.2
2854     */
2855    timestamp: number;
2856  }
2857
2858  /**
2859   * Describes the contents of the Bluetooth scan results.
2860   *
2861   * @typedef BluetoothScanInfo
2862   * @syscap SystemCapability.Location.Location.Core
2863   * @systemapi
2864   * @since arkts {'1.1':'10','1.2':'20'}
2865   * @arkts 1.1&1.2
2866   */
2867  export interface BluetoothScanInfo {
2868    /**
2869     * The local name of the device.
2870     *
2871     * @type {string}
2872     * @syscap SystemCapability.Location.Location.Core
2873     * @systemapi
2874     * @since arkts {'1.1':'10','1.2':'20'}
2875     * @arkts 1.1&1.2
2876     */
2877    deviceName: string;
2878
2879    /**
2880     * Mac address of the scanned device.
2881     *
2882     * @type {string}
2883     * @syscap SystemCapability.Location.Location.Core
2884     * @systemapi
2885     * @since arkts {'1.1':'10','1.2':'20'}
2886     * @arkts 1.1&1.2
2887     */
2888    macAddress: string;
2889
2890    /**
2891     * RSSI of the remote device.
2892     *
2893     * @type {number}
2894     * @syscap SystemCapability.Location.Location.Core
2895     * @systemapi
2896     * @since arkts {'1.1':'10','1.2':'20'}
2897     * @arkts 1.1&1.2
2898     */
2899    rssi: number;
2900
2901    /**
2902     * Time stamp.
2903     *
2904     * @type {number}
2905     * @syscap SystemCapability.Location.Location.Core
2906     * @systemapi
2907     * @since arkts {'1.1':'10','1.2':'20'}
2908     * @arkts 1.1&1.2
2909     */
2910    timestamp: number;
2911  }
2912
2913  /**
2914   * Describes the contents of the bluetooth scan results.
2915   *
2916   * @typedef BluetoothScanResult
2917   * @syscap SystemCapability.Location.Location.Core
2918   * @since arkts {'1.1':'16','1.2':'20'}
2919   * @arkts 1.1&1.2
2920   */
2921  export interface BluetoothScanResult {
2922    /**
2923     * Address of the scanned device
2924     *
2925     * @type { string }
2926     * @syscap SystemCapability.Location.Location.Core
2927     * @since arkts {'1.1':'16','1.2':'20'}
2928     * @arkts 1.1&1.2
2929     */
2930    deviceId: string;
2931
2932    /**
2933     * RSSI of the scanned device
2934     *
2935     * @type { number }
2936     * @syscap SystemCapability.Location.Location.Core
2937     * @since arkts {'1.1':'16','1.2':'20'}
2938     * @arkts 1.1&1.2
2939     */
2940    rssi: number;
2941
2942    /**
2943     * The raw data of broadcast packet
2944     *
2945     * @type { ?ArrayBuffer }
2946     * @syscap SystemCapability.Location.Location.Core
2947     * @since arkts {'1.1':'16','1.2':'20'}
2948     * @arkts 1.1&1.2
2949     */
2950    data?: ArrayBuffer;
2951
2952    /**
2953     * The local name of the scanned device
2954     *
2955     * @type { string }
2956     * @syscap SystemCapability.Location.Location.Core
2957     * @since arkts {'1.1':'16','1.2':'20'}
2958     * @arkts 1.1&1.2
2959     */
2960    deviceName: string;
2961
2962    /**
2963     * Connectable of the scanned device
2964     *
2965     * @type { boolean }
2966     * @syscap SystemCapability.Location.Location.Core
2967     * @since arkts {'1.1':'16','1.2':'20'}
2968     * @arkts 1.1&1.2
2969     */
2970    connectable: boolean;
2971  }
2972
2973  /**
2974   * Describes the information about a single POI.
2975   *
2976   * @typedef Poi
2977   * @syscap SystemCapability.Location.Location.Core
2978   * @atomicservice
2979   * @since 19
2980   */
2981  export interface Poi {
2982    /**
2983     * Indicates the ID of a POI.
2984     *
2985     * @type { string }
2986     * @syscap SystemCapability.Location.Location.Core
2987     * @atomicservice
2988     * @since 19
2989     */
2990    id: string;
2991
2992    /**
2993     * Indicates the confidence of POI information.
2994     *
2995     * @type { number }
2996     * @syscap SystemCapability.Location.Location.Core
2997     * @atomicservice
2998     * @since 19
2999     */
3000    confidence: number;
3001
3002    /**
3003     * Indicates the name of the POI.
3004     *
3005     * @type { string }
3006     * @syscap SystemCapability.Location.Location.Core
3007     * @atomicservice
3008     * @since 19
3009     */
3010    name: string;
3011
3012    /**
3013     * Indicates the latitude of POI.
3014     *
3015     * @type { number }
3016     * @syscap SystemCapability.Location.Location.Core
3017     * @atomicservice
3018     * @since 19
3019     */
3020    latitude: number;
3021
3022    /**
3023     * Indicates the longitude of POI.
3024     *
3025     * @type { number }
3026     * @syscap SystemCapability.Location.Location.Core
3027     * @atomicservice
3028     * @since 19
3029     */
3030    longitude: number;
3031
3032    /**
3033     * Indicates administrative region name.
3034     *
3035     * @type { string }
3036     * @syscap SystemCapability.Location.Location.Core
3037     * @atomicservice
3038     * @since 19
3039     */
3040    administrativeArea: string;
3041
3042    /**
3043     * Indicates sub-administrative region name.
3044     *
3045     * @type { string }
3046     * @syscap SystemCapability.Location.Location.Core
3047     * @atomicservice
3048     * @since 19
3049     */
3050    subAdministrativeArea: string;
3051
3052    /**
3053     * Indicates locality information.
3054     *
3055     * @type { string }
3056     * @syscap SystemCapability.Location.Location.Core
3057     * @atomicservice
3058     * @since 19
3059     */
3060    locality: string;
3061
3062    /**
3063     * Indicates sub-locality information.
3064     *
3065     * @type { string }
3066     * @syscap SystemCapability.Location.Location.Core
3067     * @atomicservice
3068     * @since 19
3069     */
3070    subLocality: string;
3071
3072    /**
3073     * Indicates the detailed address of the POI.
3074     *
3075     * @type { string }
3076     * @syscap SystemCapability.Location.Location.Core
3077     * @atomicservice
3078     * @since 19
3079     */
3080    address: string;
3081  }
3082
3083
3084  /**
3085   * Describes the POI information struct.
3086   *
3087   * @typedef PoiInfo
3088   * @syscap SystemCapability.Location.Location.Core
3089   * @atomicservice
3090   * @since 19
3091   */
3092  export interface PoiInfo {
3093    /**
3094     * Indicates POI information list.
3095     *
3096     * @type { Array<Poi> }
3097     * @syscap SystemCapability.Location.Location.Core
3098     * @atomicservice
3099     * @since 19
3100     */
3101    poiArray: Array<Poi>;
3102
3103    /**
3104     * Indicates the timestamp when the POI information is obtained.
3105     *
3106     * @type { number }
3107     * @syscap SystemCapability.Location.Location.Core
3108     * @atomicservice
3109     * @since 19
3110     */
3111    timestamp: number;
3112  }
3113
3114  /**
3115   * Beacon equipment manufacturer data.
3116   *
3117   * @typedef BeaconManufactureData
3118   * @syscap SystemCapability.Location.Location.Geofence
3119   * @atomicservice
3120   * @since 20
3121   */
3122  export interface BeaconManufactureData {
3123    /**
3124     * Manufacture id.
3125     *
3126     * @type { number }
3127     * @syscap SystemCapability.Location.Location.Geofence
3128     * @atomicservice
3129     * @since 20
3130     */
3131    manufactureId: number;
3132
3133    /**
3134     * Manufacture data.
3135     *
3136     * @type { ArrayBuffer }
3137     * @syscap SystemCapability.Location.Location.Geofence
3138     * @atomicservice
3139     * @since 20
3140     */
3141    manufactureData: ArrayBuffer;
3142
3143    /**
3144     * Manufacture data mask.
3145     *
3146     * @type { ArrayBuffer }
3147     * @syscap SystemCapability.Location.Location.Geofence
3148     * @atomicservice
3149     * @since 20
3150     */
3151    manufactureDataMask: ArrayBuffer;
3152  }
3153
3154  /**
3155   * Beacon fence details.
3156   *
3157   * @typedef BeaconFence
3158   * @syscap SystemCapability.Location.Location.Geofence
3159   * @atomicservice
3160   * @since 20
3161   */
3162  export interface BeaconFence {
3163    /**
3164     * Identifier of the beacon fence.
3165     *
3166     * @type { string }
3167     * @syscap SystemCapability.Location.Location.Geofence
3168     * @atomicservice
3169     * @since 20
3170     */
3171    identifier: string;
3172
3173    /**
3174     * Beacon fence information type.
3175     *
3176     * @type { BeaconFenceInfoType }
3177     * @syscap SystemCapability.Location.Location.Geofence
3178     * @atomicservice
3179     * @since 20
3180     */
3181    beaconFenceInfoType: BeaconFenceInfoType;
3182
3183    /**
3184     * Beacon equipment manufacture data.
3185     *
3186     * @type { ?BeaconManufactureData }
3187     * @syscap SystemCapability.Location.Location.Geofence
3188     * @atomicservice
3189     * @since 20
3190     */
3191    manufactureData?: BeaconManufactureData;
3192  }
3193
3194  /**
3195   * Configuring parameters in BeaconFence request.
3196   *
3197   * @typedef BeaconFenceRequest
3198   * @syscap SystemCapability.Location.Location.Geofence
3199   * @atomicservice
3200   * @since 20
3201   */
3202  export interface BeaconFenceRequest {
3203    /**
3204     * Beacon fence information.
3205     *
3206     * @type { BeaconFence }
3207     * @syscap SystemCapability.Location.Location.Geofence
3208     * @atomicservice
3209     * @since 20
3210     */
3211    beacon: BeaconFence;
3212
3213    /**
3214     * Indicates the callback for reporting the BeaconFence transition status.
3215     *
3216     * @type { ?Callback<GeofenceTransition> }
3217     * @syscap SystemCapability.Location.Location.Geofence
3218     * @atomicservice
3219     * @since 20
3220     */
3221    transitionCallback?: Callback<GeofenceTransition>;
3222
3223    /**
3224     * Indicates the name of FenceExtensionAbility.
3225     *
3226     * @type { ?string }
3227     * @syscap SystemCapability.Location.Location.Geofence
3228     * @atomicservice
3229     * @since 20
3230     */
3231    fenceExtensionAbilityName?: string;
3232  }
3233
3234  /**
3235   * Enum for the source of the location.
3236   *
3237   * @enum { number }
3238   * @syscap SystemCapability.Location.Location.Core
3239   * @atomicservice
3240   * @since arkts {'1.1':'12','1.2':'20'}
3241   * @arkts 1.1&1.2
3242   */
3243  export enum LocationSourceType {
3244    /**
3245     * The location is obtained from the GNSS.
3246     *
3247     * @syscap SystemCapability.Location.Location.Core
3248     * @atomicservice
3249     * @since arkts {'1.1':'12','1.2':'20'}
3250     * @arkts 1.1&1.2
3251     */
3252    GNSS = 1,
3253
3254    /**
3255     * The location comes from the network positioning technology.
3256     *
3257     * @syscap SystemCapability.Location.Location.Core
3258     * @atomicservice
3259     * @since arkts {'1.1':'12','1.2':'20'}
3260     * @arkts 1.1&1.2
3261     */
3262    NETWORK = 2,
3263
3264    /**
3265     * The location comes from the indoor positioning technology.
3266     *
3267     * @syscap SystemCapability.Location.Location.Core
3268     * @atomicservice
3269     * @since arkts {'1.1':'12','1.2':'20'}
3270     * @arkts 1.1&1.2
3271     */
3272    INDOOR = 3,
3273
3274    /**
3275     * The location comes from the GNSS RTK technology.
3276     *
3277     * @syscap SystemCapability.Location.Location.Core
3278     * @atomicservice
3279     * @since arkts {'1.1':'12','1.2':'20'}
3280     * @arkts 1.1&1.2
3281     */
3282    RTK = 4
3283  }
3284
3285  /**
3286   * Enum for coordinate system type.
3287   *
3288   * @enum { number }
3289   * @syscap SystemCapability.Location.Location.Geofence
3290   * @since arkts {'1.1':'12','1.2':'20'}
3291   * @arkts 1.1&1.2
3292   */
3293  export enum CoordinateSystemType {
3294    /**
3295     * WGS84 coordinates system.
3296     *
3297     * @syscap SystemCapability.Location.Location.Geofence
3298     * @since arkts {'1.1':'12','1.2':'20'}
3299     * @arkts 1.1&1.2
3300     */
3301    WGS84 = 1,
3302
3303    /**
3304     * GCJ-02 coordinates system.
3305     *
3306     * @syscap SystemCapability.Location.Location.Geofence
3307     * @since arkts {'1.1':'12','1.2':'20'}
3308     * @arkts 1.1&1.2
3309     */
3310    GCJ02 = 2
3311  }
3312
3313  /**
3314   * Enum for location icon status.
3315   *
3316   * @enum { number }
3317   * @syscap SystemCapability.Location.Location.Core
3318   * @systemapi
3319   * @since arkts {'1.1':'12','1.2':'20'}
3320   * @arkts 1.1&1.2
3321   */
3322  export enum LocationIconStatus {
3323    /**
3324     * The locating service is not started.
3325     *
3326     * @syscap SystemCapability.Location.Location.Core
3327     * @systemapi
3328     * @since arkts {'1.1':'12','1.2':'20'}
3329     * @arkts 1.1&1.2
3330     */
3331    LOCATING_NOT_STARTED = 0,
3332
3333    /**
3334     * The normal locating service is started.
3335     *
3336     * @syscap SystemCapability.Location.Location.Core
3337     * @systemapi
3338     * @since arkts {'1.1':'12','1.2':'20'}
3339     * @arkts 1.1&1.2
3340     */
3341    LOCATING_STARTED = 1,
3342
3343    /**
3344     * The HD locating service(RTK) is started.
3345     *
3346     * @syscap SystemCapability.Location.Location.Core
3347     * @systemapi
3348     * @since arkts {'1.1':'12','1.2':'20'}
3349     * @arkts 1.1&1.2
3350     */
3351    HD_LOCATING_STARTED = 2
3352  }
3353
3354  /**
3355   * Enum for location error code.
3356   *
3357   * @enum { number }
3358   * @syscap SystemCapability.Location.Location.Core
3359   * @atomicservice
3360   * @since arkts {'1.1':'12','1.2':'20'}
3361   * @arkts 1.1&1.2
3362   */
3363  export enum LocationError {
3364    /**
3365     * Default cause for location failure.
3366     *
3367     * @syscap SystemCapability.Location.Location.Core
3368     * @atomicservice
3369     * @since arkts {'1.1':'12','1.2':'20'}
3370     * @arkts 1.1&1.2
3371     */
3372    LOCATING_FAILED_DEFAULT = -1,
3373
3374    /**
3375     * Locating failed because the location permission fails to be verified.
3376     *
3377     * @syscap SystemCapability.Location.Location.Core
3378     * @atomicservice
3379     * @since arkts {'1.1':'12','1.2':'20'}
3380     * @arkts 1.1&1.2
3381     */
3382    LOCATING_FAILED_LOCATION_PERMISSION_DENIED = -2,
3383
3384    /**
3385     * Locating failed because the app is in the background and the background location permission verification failed.
3386     *
3387     * @syscap SystemCapability.Location.Location.Core
3388     * @atomicservice
3389     * @since arkts {'1.1':'12','1.2':'20'}
3390     * @arkts 1.1&1.2
3391     */
3392    LOCATING_FAILED_BACKGROUND_PERMISSION_DENIED = -3,
3393
3394    /**
3395     * Locating failed because the location switch is turned off.
3396     *
3397     * @syscap SystemCapability.Location.Location.Core
3398     * @atomicservice
3399     * @since arkts {'1.1':'12','1.2':'20'}
3400     * @arkts 1.1&1.2
3401     */
3402    LOCATING_FAILED_LOCATION_SWITCH_OFF = -4,
3403
3404    /**
3405     * Locating failed because internet access failure.
3406     *
3407     * @syscap SystemCapability.Location.Location.Core
3408     * @atomicservice
3409     * @since arkts {'1.1':'12','1.2':'20'}
3410     * @arkts 1.1&1.2
3411     */
3412    LOCATING_FAILED_INTERNET_ACCESS_FAILURE = -5
3413  }
3414
3415  /**
3416   * Enum for geofence transition status.
3417   *
3418   * @enum { number }
3419   * @syscap SystemCapability.Location.Location.Geofence
3420   * @since 12
3421   */
3422  export enum GeofenceTransitionEvent {
3423    /**
3424     * The device is within the geofence.
3425     *
3426     * @syscap SystemCapability.Location.Location.Geofence
3427     * @since 12
3428     */
3429    GEOFENCE_TRANSITION_EVENT_ENTER = 1,
3430
3431    /**
3432     * The device is out of the geofence.
3433     *
3434     * @syscap SystemCapability.Location.Location.Geofence
3435     * @since 12
3436     */
3437    GEOFENCE_TRANSITION_EVENT_EXIT = 2,
3438
3439    /**
3440     * The device is in the geographical fence for a period of time.
3441     *
3442     * @syscap SystemCapability.Location.Location.Geofence
3443     * @since 12
3444     */
3445    GEOFENCE_TRANSITION_EVENT_DWELL = 4
3446  }
3447
3448  /**
3449   * Enum for satellite constellation category.
3450   *
3451   * @enum { number }
3452   * @syscap SystemCapability.Location.Location.Gnss
3453   * @since arkts {'1.1':'12','1.2':'20'}
3454   * @arkts 1.1&1.2
3455   */
3456  export enum SatelliteConstellationCategory {
3457    /**
3458     * Invalid value.
3459     *
3460     * @syscap SystemCapability.Location.Location.Gnss
3461     * @since arkts {'1.1':'12','1.2':'20'}
3462     * @arkts 1.1&1.2
3463     */
3464    CONSTELLATION_CATEGORY_UNKNOWN = 0,
3465
3466    /**
3467     * GPS.
3468     *
3469     * @syscap SystemCapability.Location.Location.Gnss
3470     * @since arkts {'1.1':'12','1.2':'20'}
3471     * @arkts 1.1&1.2
3472     */
3473    CONSTELLATION_CATEGORY_GPS = 1,
3474
3475    /**
3476     * SBAS.
3477     *
3478     * @syscap SystemCapability.Location.Location.Gnss
3479     * @since arkts {'1.1':'12','1.2':'20'}
3480     * @arkts 1.1&1.2
3481     */
3482    CONSTELLATION_CATEGORY_SBAS = 2,
3483
3484    /**
3485     * GLONASS.
3486     *
3487     * @syscap SystemCapability.Location.Location.Gnss
3488     * @since arkts {'1.1':'12','1.2':'20'}
3489     * @arkts 1.1&1.2
3490     */
3491    CONSTELLATION_CATEGORY_GLONASS = 3,
3492
3493    /**
3494     * QZSS.
3495     *
3496     * @syscap SystemCapability.Location.Location.Gnss
3497     * @since arkts {'1.1':'12','1.2':'20'}
3498     * @arkts 1.1&1.2
3499     */
3500    CONSTELLATION_CATEGORY_QZSS = 4,
3501
3502    /**
3503     * BEIDOU.
3504     *
3505     * @syscap SystemCapability.Location.Location.Gnss
3506     * @since arkts {'1.1':'12','1.2':'20'}
3507     * @arkts 1.1&1.2
3508     */
3509    CONSTELLATION_CATEGORY_BEIDOU = 5,
3510
3511    /**
3512     * GALILEO.
3513     *
3514     * @syscap SystemCapability.Location.Location.Gnss
3515     * @since arkts {'1.1':'12','1.2':'20'}
3516     * @arkts 1.1&1.2
3517     */
3518    CONSTELLATION_CATEGORY_GALILEO = 6,
3519
3520    /**
3521     * IRNSS.
3522     *
3523     * @syscap SystemCapability.Location.Location.Gnss
3524     * @since arkts {'1.1':'12','1.2':'20'}
3525     * @arkts 1.1&1.2
3526     */
3527    CONSTELLATION_CATEGORY_IRNSS = 7
3528  }
3529
3530  /**
3531   * Enum for satellite additional information.
3532   *
3533   * @enum { number }
3534   * @syscap SystemCapability.Location.Location.Gnss
3535   * @since arkts {'1.1':'12','1.2':'20'}
3536   * @arkts 1.1&1.2
3537   */
3538  export enum SatelliteAdditionalInfo {
3539    /**
3540     * Default value.
3541     *
3542     * @syscap SystemCapability.Location.Location.Gnss
3543     * @since arkts {'1.1':'12','1.2':'20'}
3544     * @arkts 1.1&1.2
3545     */
3546    SATELLITES_ADDITIONAL_INFO_NULL = 0,
3547
3548    /**
3549     * Ephemeris data exist.
3550     *
3551     * @syscap SystemCapability.Location.Location.Gnss
3552     * @since arkts {'1.1':'12','1.2':'20'}
3553     * @arkts 1.1&1.2
3554     */
3555    SATELLITES_ADDITIONAL_INFO_EPHEMERIS_DATA_EXIST = 1,
3556
3557    /**
3558     * Almanac data exist.
3559     *
3560     * @syscap SystemCapability.Location.Location.Gnss
3561     * @since arkts {'1.1':'12','1.2':'20'}
3562     * @arkts 1.1&1.2
3563     */
3564    SATELLITES_ADDITIONAL_INFO_ALMANAC_DATA_EXIST = 2,
3565
3566    /**
3567     * This satellite is being used in location fix.
3568     *
3569     * @syscap SystemCapability.Location.Location.Gnss
3570     * @since arkts {'1.1':'12','1.2':'20'}
3571     * @arkts 1.1&1.2
3572     */
3573    SATELLITES_ADDITIONAL_INFO_USED_IN_FIX = 4,
3574
3575    /**
3576     * Carrier frequency exist.
3577     *
3578     * @syscap SystemCapability.Location.Location.Gnss
3579     * @since arkts {'1.1':'12','1.2':'20'}
3580     * @arkts 1.1&1.2
3581     */
3582    SATELLITES_ADDITIONAL_INFO_CARRIER_FREQUENCY_EXIST = 8
3583  }
3584
3585  /**
3586   * Enum for user activity scenario.
3587   *
3588   * @enum { number }
3589   * @syscap SystemCapability.Location.Location.Core
3590   * @atomicservice
3591   * @since arkts {'1.1':'12','1.2':'20'}
3592   * @arkts 1.1&1.2
3593   */
3594  export enum UserActivityScenario {
3595    /**
3596     * Navigation scenario. High positioning precision and real-time performance are required.
3597     *
3598     * @syscap SystemCapability.Location.Location.Core
3599     * @atomicservice
3600     * @since arkts {'1.1':'12','1.2':'20'}
3601     * @arkts 1.1&1.2
3602     */
3603    NAVIGATION = 0x401,
3604
3605    /**
3606     * Sport scenario. High positioning precision is required.
3607     *
3608     * @syscap SystemCapability.Location.Location.Core
3609     * @atomicservice
3610     * @since arkts {'1.1':'12','1.2':'20'}
3611     * @arkts 1.1&1.2
3612     */
3613    SPORT = 0x402,
3614
3615    /**
3616     * Transport scenario. High positioning precision and real-time performance are required.
3617     *
3618     * @syscap SystemCapability.Location.Location.Core
3619     * @atomicservice
3620     * @since arkts {'1.1':'12','1.2':'20'}
3621     * @arkts 1.1&1.2
3622     */
3623    TRANSPORT = 0x403,
3624
3625    /**
3626     * Daily life scenarios. Low requirements on positioning precision.
3627     *
3628     * @syscap SystemCapability.Location.Location.Core
3629     * @atomicservice
3630     * @since arkts {'1.1':'12','1.2':'20'}
3631     * @arkts 1.1&1.2
3632     */
3633    DAILY_LIFE_SERVICE = 0x404
3634  }
3635
3636  /**
3637   * Enum for locating priority.
3638   *
3639   * @enum { number }
3640   * @syscap SystemCapability.Location.Location.Core
3641   * @atomicservice
3642   * @since arkts {'1.1':'12','1.2':'20'}
3643   * @arkts 1.1&1.2
3644   */
3645  export enum LocatingPriority {
3646    /**
3647     * Preferentially ensure the highest locating accuracy.
3648     *
3649     * @syscap SystemCapability.Location.Location.Core
3650     * @atomicservice
3651     * @since arkts {'1.1':'12','1.2':'20'}
3652     * @arkts 1.1&1.2
3653     */
3654    PRIORITY_ACCURACY = 0x501,
3655
3656    /**
3657     * Preferentially ensure the fastest locating speed.
3658     *
3659     * @syscap SystemCapability.Location.Location.Core
3660     * @atomicservice
3661     * @since arkts {'1.1':'12','1.2':'20'}
3662     * @arkts 1.1&1.2
3663     */
3664    PRIORITY_LOCATING_SPEED = 0x502
3665  }
3666
3667  /**
3668   * Enum for location priority.
3669   *
3670   * @enum { number }
3671   * @syscap SystemCapability.Location.Location.Core
3672   * @since 9
3673   */
3674  /**
3675   * Enum for location priority.
3676   *
3677   * @enum { number }
3678   * @syscap SystemCapability.Location.Location.Core
3679   * @atomicservice
3680   * @since arkts {'1.1':'11','1.2':'20'}
3681   * @arkts 1.1&1.2
3682   */
3683  export enum LocationRequestPriority {
3684    /**
3685     * Default priority.
3686     *
3687     * @syscap SystemCapability.Location.Location.Core
3688     * @since 9
3689     */
3690    /**
3691     * Default priority.
3692     *
3693     * @syscap SystemCapability.Location.Location.Core
3694     * @atomicservice
3695     * @since arkts {'1.1':'11','1.2':'20'}
3696     * @arkts 1.1&1.2
3697     */
3698    UNSET = 0x200,
3699
3700    /**
3701     * Preferentially ensure the locating accuracy.
3702     *
3703     * @syscap SystemCapability.Location.Location.Core
3704     * @since 9
3705     */
3706    /**
3707     * Preferentially ensure the locating accuracy.
3708     *
3709     * @syscap SystemCapability.Location.Location.Core
3710     * @atomicservice
3711     * @since arkts {'1.1':'11','1.2':'20'}
3712     * @arkts 1.1&1.2
3713     */
3714    ACCURACY,
3715
3716    /**
3717     * Preferentially ensure low power consumption for locating.
3718     *
3719     * @syscap SystemCapability.Location.Location.Core
3720     * @since 9
3721     */
3722    /**
3723     * Preferentially ensure low power consumption for locating.
3724     *
3725     * @syscap SystemCapability.Location.Location.Core
3726     * @atomicservice
3727     * @since arkts {'1.1':'11','1.2':'20'}
3728     * @arkts 1.1&1.2
3729     */
3730    LOW_POWER,
3731
3732    /**
3733     * Preferentially ensure that the first location is time-consuming.
3734     *
3735     * @syscap SystemCapability.Location.Location.Core
3736     * @since 9
3737     */
3738    /**
3739     * Preferentially ensure that the first location is time-consuming.
3740     *
3741     * @syscap SystemCapability.Location.Location.Core
3742     * @atomicservice
3743     * @since arkts {'1.1':'11','1.2':'20'}
3744     * @arkts 1.1&1.2
3745     */
3746    FIRST_FIX
3747  }
3748
3749  /**
3750   * Enum for location scenario.
3751   *
3752   * @enum { number }
3753   * @syscap SystemCapability.Location.Location.Core
3754   * @since 9
3755   */
3756  /**
3757   * Enum for location scenario.
3758   *
3759   * @enum { number }
3760   * @syscap SystemCapability.Location.Location.Core
3761   * @atomicservice
3762   * @since arkts {'1.1':'11','1.2':'20'}
3763   * @arkts 1.1&1.2
3764   */
3765  export enum LocationRequestScenario {
3766    /**
3767     * Default scenario.
3768     *
3769     * @syscap SystemCapability.Location.Location.Core
3770     * @since 9
3771     */
3772    /**
3773     * Default scenario.
3774     *
3775     * @syscap SystemCapability.Location.Location.Core
3776     * @atomicservice
3777     * @since arkts {'1.1':'11','1.2':'20'}
3778     * @arkts 1.1&1.2
3779     */
3780    UNSET = 0x300,
3781
3782    /**
3783     * Navigation scenario. High positioning precision and real-time performance are required.
3784     *
3785     * @syscap SystemCapability.Location.Location.Core
3786     * @since 9
3787     */
3788    /**
3789     * Navigation scenario. High positioning precision and real-time performance are required.
3790     *
3791     * @syscap SystemCapability.Location.Location.Core
3792     * @atomicservice
3793     * @since arkts {'1.1':'11','1.2':'20'}
3794     * @arkts 1.1&1.2
3795     */
3796    NAVIGATION,
3797
3798    /**
3799     * Trajectory tracking scenario. High positioning precision is required.
3800     *
3801     * @syscap SystemCapability.Location.Location.Core
3802     * @since 9
3803     */
3804    /**
3805     * Trajectory tracking scenario. High positioning precision is required.
3806     *
3807     * @syscap SystemCapability.Location.Location.Core
3808     * @atomicservice
3809     * @since arkts {'1.1':'11','1.2':'20'}
3810     * @arkts 1.1&1.2
3811     */
3812    TRAJECTORY_TRACKING,
3813
3814    /**
3815     * Car hailing scenario. High positioning precision and real-time performance are required.
3816     *
3817     * @syscap SystemCapability.Location.Location.Core
3818     * @since 9
3819     */
3820    /**
3821     * Car hailing scenario. High positioning precision and real-time performance are required.
3822     *
3823     * @syscap SystemCapability.Location.Location.Core
3824     * @atomicservice
3825     * @since arkts {'1.1':'11','1.2':'20'}
3826     * @arkts 1.1&1.2
3827     */
3828    CAR_HAILING,
3829
3830    /**
3831     * Daily life scenarios. Low requirements on positioning precision and real-time performance.
3832     *
3833     * @syscap SystemCapability.Location.Location.Core
3834     * @since 9
3835     */
3836    /**
3837     * Daily life scenarios. Low requirements on positioning precision and real-time performance.
3838     *
3839     * @syscap SystemCapability.Location.Location.Core
3840     * @atomicservice
3841     * @since arkts {'1.1':'11','1.2':'20'}
3842     * @arkts 1.1&1.2
3843     */
3844    DAILY_LIFE_SERVICE,
3845
3846    /**
3847     * Power saving scenarios.
3848     *
3849     * @syscap SystemCapability.Location.Location.Core
3850     * @since 9
3851     */
3852    /**
3853     * Power saving scenarios.
3854     *
3855     * @syscap SystemCapability.Location.Location.Core
3856     * @atomicservice
3857     * @since arkts {'1.1':'11','1.2':'20'}
3858     * @arkts 1.1&1.2
3859     */
3860    NO_POWER
3861  }
3862
3863  /**
3864   * Enum for power consumption scenario.
3865   *
3866   * @enum { number }
3867   * @syscap SystemCapability.Location.Location.Core
3868   * @atomicservice
3869   * @since arkts {'1.1':'12','1.2':'20'}
3870   * @arkts 1.1&1.2
3871   */
3872  export enum PowerConsumptionScenario {
3873    /**
3874     * High power consumption mode.
3875     *
3876     * @syscap SystemCapability.Location.Location.Core
3877     * @atomicservice
3878     * @since arkts {'1.1':'12','1.2':'20'}
3879     * @arkts 1.1&1.2
3880     */
3881    HIGH_POWER_CONSUMPTION = 0x601,
3882
3883    /**
3884     * Low power consumption mode.
3885     *
3886     * @syscap SystemCapability.Location.Location.Core
3887     * @atomicservice
3888     * @since arkts {'1.1':'12','1.2':'20'}
3889     * @arkts 1.1&1.2
3890     */
3891    LOW_POWER_CONSUMPTION = 0x602,
3892
3893    /**
3894     * Power saving scenarios.
3895     *
3896     * @syscap SystemCapability.Location.Location.Core
3897     * @atomicservice
3898     * @since arkts {'1.1':'12','1.2':'20'}
3899     * @arkts 1.1&1.2
3900     */
3901    NO_POWER_CONSUMPTION = 0x603
3902  }
3903
3904  /**
3905   * Enum for location privacy type.
3906   *
3907   * @enum { number }
3908   * @syscap SystemCapability.Location.Location.Core
3909   * @systemapi
3910   * @since arkts {'1.1':'9','1.2':'20'}
3911   * @arkts 1.1&1.2
3912   */
3913  export enum LocationPrivacyType {
3914    /**
3915     * Other scenarios.
3916     *
3917     * @syscap SystemCapability.Location.Location.Core
3918     * @systemapi
3919     * @since arkts {'1.1':'9','1.2':'20'}
3920     * @arkts 1.1&1.2
3921     */
3922    OTHERS = 0,
3923
3924    /**
3925     * Privacy agreement for the startup wizard scenario.
3926     *
3927     * @syscap SystemCapability.Location.Location.Core
3928     * @systemapi
3929     * @since arkts {'1.1':'9','1.2':'20'}
3930     * @arkts 1.1&1.2
3931     */
3932    STARTUP,
3933
3934    /**
3935     * Privacy agreement pop-up when network location is enabled.
3936     *
3937     * @syscap SystemCapability.Location.Location.Core
3938     * @systemapi
3939     * @since arkts {'1.1':'9','1.2':'20'}
3940     * @arkts 1.1&1.2
3941     */
3942    CORE_LOCATION
3943  }
3944
3945  /**
3946   * Enum for sports type
3947   *
3948   * @enum { number }
3949   * @syscap SystemCapability.Location.Location.Core
3950   * @atomicservice
3951   * @since arkts {'1.1':'18','1.2':'20'}
3952   * @arkts 1.1&1.2
3953   */
3954  export enum SportsType {
3955    /**
3956     * Indicates running.
3957     *
3958     * @syscap SystemCapability.Location.Location.Core
3959     * @atomicservice
3960     * @since arkts {'1.1':'18','1.2':'20'}
3961     * @arkts 1.1&1.2
3962     */
3963    RUNNING = 1,
3964
3965    /**
3966     * Indicates walking.
3967     *
3968     * @syscap SystemCapability.Location.Location.Core
3969     * @atomicservice
3970     * @since arkts {'1.1':'18','1.2':'20'}
3971     * @arkts 1.1&1.2
3972     */
3973    WALKING,
3974
3975    /**
3976     * Indicates cycling.
3977     *
3978     * @syscap SystemCapability.Location.Location.Core
3979     * @atomicservice
3980     * @since arkts {'1.1':'18','1.2':'20'}
3981     * @arkts 1.1&1.2
3982     */
3983    CYCLING
3984  }
3985
3986  /**
3987   * Location subsystem command structure.
3988   *
3989   * @typedef LocationCommand
3990   * @syscap SystemCapability.Location.Location.Core
3991   * @since 9
3992   */
3993  export interface LocationCommand {
3994    /**
3995     * Information about the scenario where the command is sent.
3996     *
3997     * @type { LocationRequestScenario }
3998     * @syscap SystemCapability.Location.Location.Core
3999     * @since 9
4000     */
4001    scenario: LocationRequestScenario;
4002
4003    /**
4004     * Sent command content.
4005     *
4006     * @type { string }
4007     * @syscap SystemCapability.Location.Location.Core
4008     * @since 9
4009     */
4010    command: string;
4011  }
4012
4013  /**
4014   * Country code structure.
4015   *
4016   * @typedef CountryCode
4017   * @syscap SystemCapability.Location.Location.Core
4018   * @since arkts {'1.1':'9','1.2':'20'}
4019   * @arkts 1.1&1.2
4020   */
4021  export interface CountryCode {
4022    /**
4023     * Country code character string.
4024     *
4025     * @type { string }
4026     * @syscap SystemCapability.Location.Location.Core
4027     * @since arkts {'1.1':'9','1.2':'20'}
4028     * @arkts 1.1&1.2
4029     */
4030    country: string;
4031
4032    /**
4033     * Country code source.
4034     *
4035     * @type { CountryCodeType }
4036     * @syscap SystemCapability.Location.Location.Core
4037     * @since arkts {'1.1':'9','1.2':'20'}
4038     * @arkts 1.1&1.2
4039     */
4040    type: CountryCodeType;
4041  }
4042
4043  /**
4044   * Enum for country code type.
4045   *
4046   * @enum { number }
4047   * @syscap SystemCapability.Location.Location.Core
4048   * @since arkts {'1.1':'9','1.2':'20'}
4049   * @arkts 1.1&1.2
4050   */
4051  export enum CountryCodeType {
4052    /**
4053     * Country code obtained from the locale setting.
4054     *
4055     * @syscap SystemCapability.Location.Location.Core
4056     * @since arkts {'1.1':'9','1.2':'20'}
4057     * @arkts 1.1&1.2
4058     */
4059    COUNTRY_CODE_FROM_LOCALE = 1,
4060
4061    /**
4062     * Country code obtained from the SIM information.
4063     *
4064     * @syscap SystemCapability.Location.Location.Core
4065     * @since arkts {'1.1':'9','1.2':'20'}
4066     * @arkts 1.1&1.2
4067     */
4068    COUNTRY_CODE_FROM_SIM,
4069
4070    /**
4071     * Query the country code information from the reverse geocoding result.
4072     *
4073     * @syscap SystemCapability.Location.Location.Core
4074     * @since arkts {'1.1':'9','1.2':'20'}
4075     * @arkts 1.1&1.2
4076     */
4077    COUNTRY_CODE_FROM_LOCATION,
4078
4079    /**
4080     * Obtain the country code from the cell registration information.
4081     *
4082     * @syscap SystemCapability.Location.Location.Core
4083     * @since arkts {'1.1':'9','1.2':'20'}
4084     * @arkts 1.1&1.2
4085     */
4086    COUNTRY_CODE_FROM_NETWORK
4087  }
4088
4089  /**
4090   * Enum for locating required data type.
4091   *
4092   * @enum { number }
4093   * @syscap SystemCapability.Location.Location.Core
4094   * @systemapi
4095   * @since arkts {'1.1':'10','1.2':'20'}
4096   * @arkts 1.1&1.2
4097   */
4098  export enum LocatingRequiredDataType {
4099    /**
4100     * Obtains WiFi scanning information for locating.
4101     *
4102     * @syscap SystemCapability.Location.Location.Core
4103     * @systemapi
4104     * @since arkts {'1.1':'10','1.2':'20'}
4105     * @arkts 1.1&1.2
4106     */
4107    WIFI = 1,
4108
4109    /**
4110     * Obtains BT scanning information for locating.
4111     *
4112     * @syscap SystemCapability.Location.Location.Core
4113     * @systemapi
4114     * @since arkts {'1.1':'10','1.2':'20'}
4115     * @arkts 1.1&1.2
4116     */
4117    BLUETOOTH
4118  }
4119
4120  /**
4121   * Enum for the beacon fence information type.
4122   *
4123   * @enum { number }
4124   * @syscap SystemCapability.Location.Location.Geofence
4125   * @atomicservice
4126   * @since 20
4127   */
4128  export enum BeaconFenceInfoType {
4129    /**
4130     * Identifies a beacon device using beacon device manufacture data.
4131     *
4132     * @syscap SystemCapability.Location.Location.Geofence
4133     * @atomicservice
4134     * @since 20
4135     */
4136    BEACON_MANUFACTURE_DATA = 1
4137  }
4138}
4139
4140export default geoLocationManager;
4141