diff --git a/en/application-dev/dfx/apprecovery-guidelines.md b/en/application-dev/dfx/apprecovery-guidelines.md index bae804c558a57b61915760d37f46b73a03ebcf84..48812bc90acceca2b8ca3df704316b4247a4517c 100644 --- a/en/application-dev/dfx/apprecovery-guidelines.md +++ b/en/application-dev/dfx/apprecovery-guidelines.md @@ -33,7 +33,7 @@ The APIs are used for troubleshooting and do not return any exception. Therefore Fault management is an important way for applications to deliver a better user experience. The application framework offers three methods for application fault management: fault listening, fault rectification, and fault query. -- Fault listening refers to the process of registering [ErrorObserver](../reference/apis/js-apis-application-errorManager.md#errorobserver) via [errorManager](../reference/apis/js-apis-application-errorManager.md), listening for fault occurrence, and notifying the fault listener. +- Fault listening refers to the process of registering [ErrorObserver](../reference/apis/js-apis-inner-application-errorObserver.md) via [errorManager](../reference/apis/js-apis-app-ability-errorManager.md), listening for fault occurrence, and notifying the fault listener. - Fault rectification refers to [appRecovery](../reference/apis/js-apis-app-ability-appRecovery.md) and restarts an application to restore its status previous to a fault. @@ -42,8 +42,8 @@ Fault management is an important way for applications to deliver a better user e The figure below does not illustrate the time when [faultLogger](../reference/apis/js-apis-faultLogger.md) is called. You can refer to [LastExitReason](../reference/apis/js-apis-application-abilityConstant.md#abilityconstantlastexitreason) passed during application initialization to determine whether to call [faultLogger](../reference/apis/js-apis-faultLogger.md) to query the information about the last fault. ![Fault rectification process](./figures/fault_rectification.png) -It is recommended that you call [errorManager](../reference/apis/js-apis-application-errorManager.md) to process the exception. After the processing is complete, you can call the status saving API and restart the application. -If you do not register [ErrorObserver](../reference/apis/js-apis-application-errorManager.md#errorobserver) or enable application recovery, the application process will exit according to the default processing logic of the system. Users can restart the application from the home screen. +It is recommended that you call [errorManager](../reference/apis/js-apis-app-ability-errorManager.md) to process the exception. After the processing is complete, you can call the status saving API and restart the application. +If you do not register [ErrorObserver](../reference/apis/js-apis-inner-application-errorObserver.md) or enable application recovery, the application process will exit according to the default processing logic of the system. Users can restart the application from the home screen. If you have enabled application recovery, the framework first checks whether a fault allows for ability status saving and whether you have configured ability status saving. If so, [onSaveState](../reference/apis/js-apis-application-ability.md#abilityonsavestate) of [Ability](../reference/apis/js-apis-application-ability.md#ability) is called back. Finally, the application is restarted. ### Scenarios Supported by Application Fault Management APIs @@ -95,7 +95,7 @@ import AbilityConstant from '@ohos.app.ability.AbilityConstant' #### Actively Saving Status and Restoring Data -- Define and register the [ErrorObserver](../reference/apis/js-apis-application-errorManager.md#errorobserver) callback. +- Define and register the [ErrorObserver](../reference/apis/js-apis-inner-application-errorObserver.md) callback. ```ts var registerId = -1; diff --git a/en/application-dev/internationalization/intl-guidelines.md b/en/application-dev/internationalization/intl-guidelines.md index 7f21dbb96ccc97b2cafba47c50755af06565a997..616be22d2788a907bad5db836a0b8a76ac54f6f2 100644 --- a/en/application-dev/internationalization/intl-guidelines.md +++ b/en/application-dev/internationalization/intl-guidelines.md @@ -240,7 +240,7 @@ Users in different regions have different requirements for string sorting. [Coll let collator = new Intl.Collator(); ``` - Alternatively, use your own locale and formatting parameters to create a **Collator** object. For a full list of parameters, see [CollatorOptions](../reference/apis/js-apis-intl.md#collatoroptions8). + Alternatively, use your own locale and formatting parameters to create a **Collator** object. For a full list of parameters, see [CollatorOptions](../reference/apis/js-apis-intl.md#collatoroptions9). The **sensitivity** parameter is used to specify the levels of differences that will be used for string comparison. The value **base** indicates that only characters are compared, but not the accent and capitalization. For example, 'a' != 'b', 'a' == '', 'a'=='A'. The value **accent** indicates that the accent is considered, but not the capitalization. For example, 'a' != 'b', 'a' == '', 'a'=='A'. The value **case** indicates that the capitalization is considered, but the accent. For example, 'a' != 'b', 'a' == '', 'a'=='A'. The value **variant** indicates that the accent and capitalization are considered. For example, 'a' != 'b', 'a' == '', 'a'=='A'. ```js @@ -301,7 +301,7 @@ According to grammars in certain languages, the singular or plural form of a nou let pluralRules = new Intl.PluralRules(); ``` - Alternatively, use your own locale and formatting parameters to create a **PluralRules** object. For a full list of parameters, see [PluralRulesOptions](../reference/apis/js-apis-intl.md#pluralrulesoptions8). + Alternatively, use your own locale and formatting parameters to create a **PluralRules** object. For a full list of parameters, see [PluralRulesOptions](../reference/apis/js-apis-intl.md#pluralrulesoptions9). ```js let pluralRules = new Intl.PluralRules("zh-CN", {localeMatcher: "best fit", type: "cardinal"}); @@ -349,7 +349,7 @@ According to grammars in certain languages, the singular or plural form of a nou let relativeTimeFormat = new Intl.RelativeTimeFormat(); ``` - Alternatively, use your own locale and formatting parameters to create a **RelativeTimeFormat** object. Formatting parameters are optional. For a full list of formatting parameters, see [RelativeTimeFormatInputOptions](../reference/apis/js-apis-intl.md#relativetimeformatinputoptions8). + Alternatively, use your own locale and formatting parameters to create a **RelativeTimeFormat** object. Formatting parameters are optional. For a full list of formatting parameters, see [RelativeTimeFormatInputOptions](../reference/apis/js-apis-intl.md#relativetimeformatinputoptions9). ```js let relativeTimeFormat = new Intl.RelativeTimeFormat("zh-CN", {numeric: "always", style: "long"}); diff --git a/en/application-dev/reference/apis/js-apis-call.md b/en/application-dev/reference/apis/js-apis-call.md index 6b6222abe96a415e28290892f8e6a215c1e98478..487f395f07e81936693d7d0bf9a275926ede4c26 100644 --- a/en/application-dev/reference/apis/js-apis-call.md +++ b/en/application-dev/reference/apis/js-apis-call.md @@ -20,6 +20,10 @@ dial\(phoneNumber: string, callback: AsyncCallback\): void Initiates a call. This API uses an asynchronous callback to return the result. +>**NOTE** +> +>This parameter is supported since API version 6 and deprecated since API version 9. You are advised to use [dialCall](#calldialcall9). + **Required Permissions**: ohos.permission.PLACE_CALL **System capability**: SystemCapability.Telephony.CallManager @@ -46,6 +50,10 @@ dial\(phoneNumber: string, options: DialOptions, callback: AsyncCallback**NOTE** +> +>This parameter is supported since API version 6 and deprecated since API version 9. You are advised to use [dialCall](#calldialcall9). + **Required Permissions**: ohos.permission.PLACE_CALL **System capability**: SystemCapability.Telephony.CallManager @@ -75,6 +83,10 @@ dial\(phoneNumber: string, options?: DialOptions\): Promise Initiates a call. You can set call options as needed. This API uses a promise to return the result. +>**NOTE** +> +>This parameter is supported since API version 6 and deprecated since API version 9. You are advised to use [dialCall](#calldialcall9). + **Required Permissions**: ohos.permission.PLACE_CALL **System capability**: SystemCapability.Telephony.CallManager @@ -123,7 +135,7 @@ Initiates a call. This API uses an asynchronous callback to return the result. | Name | Type | Mandatory| Description | | ----------- | ---------------------------- | ---- | --------------------------------------- | | phoneNumber | string | Yes | Phone number. | -| callback | AsyncCallback<void> | Yes | Callback used to return the result. | +| callback | AsyncCallback<void> | Yes | Callback used to return the result. | **Error codes** For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). @@ -206,10 +218,10 @@ Initiates a call. You can set call options as needed. This API uses a promise to **Parameters** -| Name | Type | Mandatory| Description | -| ----------- | ----------------------------------- | ---- | -------------------------------------- | -| phoneNumber | string | Yes | Phone number. | -| options | [DialCallOptions](#dialcalloptions9)| No | Call option, which indicates whether the call is a voice call or video call.| +| Name | Type | Mandatory| Description | +| ----------- | ----------------------------------- | ---- |-------------------| +| phoneNumber | string | Yes | Phone number. | +| options | [DialCallOptions](#dialcalloptions9)| No | Call options, which carry other configuration information of the call.| **Return value** @@ -232,12 +244,22 @@ For details about the following error codes, see [Telephony Error Codes](../../r **Example** ```js -try { +let promise = call.dialCall("138xxxxxxxx", { call.dialCall('138xxxxxxxx'); + accountId: 0, + videoState: 0, + dialScene: 0, + dialType: 0, +}); +promise.then(data => { + console.log(`dialCall success, promise: data->${JSON.stringify(data)}`); console.log(`dialCall success, promise: data->${JSON.stringify(data)}`); } catch (error) { +}).catch(err => { console.log(`dialCall fail, promise: err->${JSON.stringify(error)}`); + console.error(`dialCall fail, promise: err->${JSON.stringify(err)}`); } +}); ``` @@ -836,7 +858,7 @@ promise.then(data => { ``` -## call.answerCall7+ +## call.answerCall9+ answerCall\(callId: number, callback: AsyncCallback\): void @@ -876,7 +898,7 @@ call.answerCall(1, (err, data) => { ``` -## call.answerCall7+ +## call.answerCall9+ answerCall(callId?: number\): Promise @@ -963,7 +985,7 @@ call.answerCall((err, data) => { ``` -## call.hangUpCall7+ +## call.hangUpCall9+ hangUpCall\(callId: number, callback: AsyncCallback\): void @@ -1003,7 +1025,7 @@ call.hangUpCall(1, (err, data) => { ``` -## call.hangUpCall7+ +## call.hangUpCall9+ hangUpCall\(callId?: number\): Promise @@ -1132,7 +1154,7 @@ call.rejectCall(1, (err, data) => { ``` -## call.rejectCall7+ +## call.rejectCall9+ rejectCall\(callId: number, options: RejectMessageOptions, callback: AsyncCallback\): void @@ -1176,7 +1198,7 @@ call.rejectCall(1, rejectMessageOptions, (err, data) => { ``` -## call.rejectCall7+ +## call.rejectCall9+ rejectCall(callId?: number, options?: RejectMessageOptions\): Promise @@ -2332,7 +2354,7 @@ Subscribes to **callDetailsChange** events. This API uses an asynchronous callba | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------------- | ---- | -------------------------- | -| type | string | Yes | Call details change during a call.| +| type | string | Yes | Call details change.| | callback | Callback<[CallAttributeOptions](#callattributeoptions7)> | Yes | Callback used to return the result. | **Error codes** @@ -2371,7 +2393,7 @@ Subscribes to **callEventChange** events. This API uses an asynchronous callback | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------ | ---- | -------------------------- | -| type | string | Yes | Call event change during a call.| +| type | string | Yes | Call event change.| | callback | Callback<[CallEventOptions](#calleventoptions8)> | Yes | Callback used to return the result. | **Error codes** @@ -2410,7 +2432,7 @@ Subscribes to **callDisconnectedCause** events. This API uses an asynchronous ca | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------------ | ---- | -------------------------- | -| type | string | Yes | Cause of the call disconnection.| +| type | string | Yes | Call disconnection cause.| | callback | Callback<[DisconnectedDetails](#disconnecteddetails9)> | Yes | Callback used to return the result. | **Error codes** @@ -2488,7 +2510,7 @@ Unsubscribes from **callDetailsChange** events. This API uses an asynchronous ca | Name | Type | Mandatory| Description | | -------- | -------------------------------------------------------- | ---- | ---------------------------------- | -| type | string | Yes | IMS registration status changes.| +| type | string | Yes | IMS registration status change.| | callback | Callback<[CallAttributeOptions](#callattributeoptions7)> | No | Callback used to return the result. | **Error codes** @@ -2527,7 +2549,7 @@ Unsubscribes from **callEventChange** events. This API uses an asynchronous call | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------ | ---- | ---------------------------------- | -| type | string | Yes | Unsubscription from call event changes when a call ends.| +| type | string | Yes | Call event change.| | callback | Callback<[CallEventOptions](#calleventoptions8)> | No | Callback used to return the result. | **Error codes** @@ -2566,7 +2588,7 @@ Unsubscribes from **callDisconnectedCause** events. This API uses an asynchronou | Name | Type | Mandatory| Description | | -------- | ---------------------------------------------------------- | ---- | -------------------- | -| type | 'callDisconnectedCause' | Yes | Unsubscription from the call disconnection cause when a call ends.| +| type | 'callDisconnectedCause' | Yes | Call disconnection cause.| | callback | Callback**<**[DisconnectedDetails](#disconnecteddetails9)> | No | Callback used to return the result. | **Error codes** @@ -2605,7 +2627,7 @@ Unsubscribes from **mmiCodeResult** events. This API uses an asynchronous callba | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------ | ---- | ----------- | -| type | 'mmiCodeResult' | Yes | MMI code result.| +| type | 'mmiCodeResult' | Yes | Defines the MMI code result.| | callback | Callback<[MmiCodeResults](#mmicoderesults9)> | No | Callback used to return the result. | **Error codes** diff --git a/en/application-dev/reference/apis/js-apis-geoLocationManager.md b/en/application-dev/reference/apis/js-apis-geoLocationManager.md index ea09779333acfc4ae099c658dd056a60a33f051d..270ac8903551af57702de46379e83aa840c35667 100644 --- a/en/application-dev/reference/apis/js-apis-geoLocationManager.md +++ b/en/application-dev/reference/apis/js-apis-geoLocationManager.md @@ -280,7 +280,7 @@ Sets the priority of the location request. | Name| Value| Description| | -------- | -------- | -------- | -| UNSET | 0x300 | Scenario unspecified.
If this option is used, [LocationRequestScenario](#locationrequest scenario) is invalid.| +| UNSET | 0x300 | Scenario unspecified.
If this option is used, [LocationRequestScenario](#locationrequestscenario) is invalid.| | NAVIGATION | 0x301 | Navigation scenario.
This option is applicable when your application needs to obtain the real-time location of a mobile device outdoors, such as navigation for driving or walking.
In this scenario, GNSS positioning is used to provide location services to ensure the optimal location accuracy of the system.
The location result is reported at a minimum interval of 1 second by default.| | TRAJECTORY_TRACKING | 0x302 | Trajectory tracking scenario.
This option is applicable when your application needs to record user trajectories, for example, the track recording function of sports applications. In this scenario, the GNSS positioning technology is mainly used to ensure the location accuracy.
The location result is reported at a minimum interval of 1 second by default.| | CAR_HAILING | 0x303 | Ride hailing scenario.
This option is applicable when your application needs to obtain the current location of a user who is hailing a taxi.
The location result is reported at a minimum interval of 1 second by default.| @@ -882,7 +882,6 @@ For details about the following error codes, see [Location Error Codes](../error | ID| Error Message| | -------- | ---------------------------------------- | |3301000 | Location service is unavailable. | -|3301100 | The location switch is off. | |3301500 | Failed to query the area information. | @@ -924,7 +923,6 @@ For details about the following error codes, see [Location Error Codes](../error | ID| Error Message| | -------- | ---------------------------------------- | |3301000 | Location service is unavailable. | -|3301100 | The location switch is off. | |3301500 | Failed to query the area information. | **Example** diff --git a/en/application-dev/reference/apis/js-apis-system-location.md b/en/application-dev/reference/apis/js-apis-system-location.md index f5ae70c08bfd2a5481e1b83a01e6d5466a686ce6..4e141ca023493913251eb87e4007df06af3db283 100644 --- a/en/application-dev/reference/apis/js-apis-system-location.md +++ b/en/application-dev/reference/apis/js-apis-system-location.md @@ -21,44 +21,22 @@ ohos.permission.LOCATION ## geolocation.getLocation(deprecated) -getLocation(Object): void +getLocation(options?: GetLocationOption): void Obtains the geographic location. > **NOTE** > This API is deprecated since API version 9. You are advised to use [geoLocationManager.getCurrentLocation](js-apis-geoLocationManager.md#geolocationmanagergetcurrentlocation). +**Required permissions**: ohos.permission.LOCATION + **System capability**: SystemCapability.Location.Location.Lite **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| timeout | number | No| Timeout duration, in ms. The default value is **30000**.
The timeout duration is necessary in case the request to obtain the geographic location is rejected for the lack of the required permission, weak positioning signal, or incorrect location settings. After the timeout duration expires, the fail function will be called.
The value is a 32-digit positive integer. If the specified value is less than or equal to **0**, the default value will be used.| -| coordType | string | No| Coordinate system type. Available types can be obtained by **getSupportedCoordTypes**. The default type is **wgs84**.| -| success | Function | No| Called when API call is successful.| -| fail | Function | No| Called when API call has failed.| -| complete | Function | No| Called when API call is complete.| - -**Return value of success()** - -| Name| Type| Description| -| -------- | -------- | -------- | -| longitude | number | Longitude.| -| latitude | number | Latitude.| -| altitude | number | Altitude.| -| accuracy | number | Location accuracy.| -| time | number | Time when the location is obtained.| - -**Return value of fail()** - -| Error Code| Description| -| -------- | -------- | -| 601 | Failed to obtain the required permission because the user rejected the request.| -| 602 | Permission not declared.| -| 800 | Operation times out due to a poor network condition or GNSS unavailability.| -| 801 | System location disabled.| -| 802 | API called again while the previous execution result is not returned yet.| +| options | [GetLocationOption](#getlocationoptiondeprecated) | No| Options of a single location request.| **Example** @@ -80,7 +58,7 @@ export default { ## geolocation.getLocationType(deprecated) -getLocationType(Object): void +getLocationType(options?: GetLocationTypeOption): void Obtains the supported location types. @@ -93,15 +71,7 @@ Obtains the supported location types. | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| success | Function | No| Called when API call is successful.| -| fail | Function | No| Called when API call has failed.| -| complete | Function | No| Called when API call is complete.| - -**Return value of success()** - -| Name| Type| Description| -| -------- | -------- | -------- | -| types | Array<string> | Available location types, ['gps', 'network']| +| options | [GetLocationTypeOption](#getlocationtypeoptiondeprecated) | No| Callback used to return the result.| **Example** @@ -123,40 +93,22 @@ export default { ## geolocation.subscribe(deprecated) -subscribe(Object): void +subscribe(options: SubscribeLocationOption): void Listens to the geographic location. If this method is called multiple times, the last call takes effect. > **NOTE** > This API is deprecated since API version 9. You are advised to use [geoLocationManager.on('locationChange')](js-apis-geoLocationManager.md#geolocationmanageronlocationchange). +**Required permissions**: ohos.permission.LOCATION + **System capability**: SystemCapability.Location.Location.Lite **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| coordType | string | No| Coordinate system type. Available types can be obtained by **getSupportedCoordTypes**. The default type is **wgs84**.| -| success | Function | Yes| Called when the geographic location changes.| -| fail | Function | No| Called when API call has failed.| - -**Return value of success()** - -| Name| Type| Description| -| -------- | -------- | -------- | -| longitude | number | Longitude.| -| latitude | number | Latitude.| -| altitude | number | Altitude.| -| accuracy | number | Location accuracy.| -| time | number | Time when the location is obtained.| - -**Return value of fail()** - -| Error Code| Description| -| -------- | -------- | -| 601 | Failed to obtain the required permission because the user rejected the request.| -| 602 | Permission not declared.| -| 801 | System location disabled.| +| options | [SubscribeLocationOption](#subscribelocationoptiondeprecated) | Yes| Options for continuous location.| **Example** @@ -185,6 +137,8 @@ Cancels listening to the geographic location. > **NOTE** > This API is deprecated since API version 9. You are advised to use [geoLocationManager.off('locationChange')](js-apis-geoLocationManager.md#geolocationmanagerofflocationchange). +**Required permissions**: ohos.permission.LOCATION + **System capability**: SystemCapability.Location.Location.Lite **Example** @@ -224,3 +178,102 @@ export default { }, } ``` + +## GetLocationOption(deprecated) + +Defines the options of a single location request. + +> **NOTE** +> This API is deprecated since API version 9. You are advised to use [geoLocationManager.CurrentLocationRequest](js-apis-geoLocationManager.md#CurrentLocationRequest). + +**Required permissions**: ohos.permission.LOCATION + +**System capability**: SystemCapability.Location.Location.Lite + +| Name| Type| Mandatory| Description| +| -------- | -------- | -------- | -------- | +| timeout | number | No| Timeout duration, in ms. The default value is **30000**.
The timeout duration is necessary in case the request to obtain the geographic location is rejected for the lack of the required permission, weak positioning signal, or incorrect location settings. After the timeout duration expires, the fail function will be called.
The value is a 32-digit positive integer. If the specified value is less than or equal to **0**, the default value will be used.| +| coordType | string | No| Coordinate system type. Available types can be obtained by **getSupportedCoordTypes**. The default type is **wgs84**.| +| success | (data: [GeolocationResponse](#geolocationresponsedeprecated)) => void | No| Called when API call is successful.| +| fail | (data: string, code: number) => void | No| Called when API call has failed. **data** indicates the error information, and **code** indicates the error code.| +| complete | () => void | No| Called when API call is complete.| + +**Return value of fail()** + +| Error Code| Description| +| -------- | -------- | +| 601 | Failed to obtain the required permission because the user rejected the request.| +| 602 | Permission not declared.| +| 800 | Operation times out due to a poor network condition or GNSS unavailability.| +| 801 | System location disabled.| +| 802 | API called again while the previous execution result is not returned yet.| + +## GeolocationResponse(deprecated) + +Defines the location information, including the longitude, latitude, and location precision. + +> **NOTE** +> This API is deprecated since API version 9. You are advised to use [geoLocationManager.Location](js-apis-geoLocationManager.md#location). + +**System capability**: SystemCapability.Location.Location.Lite + +| Name| Type| Readable| Writable| Description| +| -------- | -------- | -------- | -------- | -------- | +| longitude | number | Yes| No| Longitude.| +| latitude | number | Yes| No| Latitude.| +| altitude | number | Yes| No| Altitude.| +| accuracy | number | Yes| No| Location accuracy.| +| time | number | Yes| No| Time when the location is obtained.| + +## GetLocationTypeOption(deprecated) + +Defines the location type option, which holds the callback function used to return the query result. + +> **NOTE** +> This API is deprecated since API version 9. + +**System capability**: SystemCapability.Location.Location.Lite + +| Name| Type| Mandatory| Description| +| -------- | -------- | -------- | -------- | +| success | (data: [GetLocationTypeResponse](#getlocationtyperesponsedeprecated)) => void | No| Called when API call is successful.| +| fail | (data: string, code: number) => void | No| Called when API call has failed.| +| complete | () => void | No| Called when API call is complete.| + +## GetLocationTypeResponse(deprecated) + +Defines the list of location types supported by the current device + +> **NOTE** +> This API is deprecated since API version 9. + +**System capability**: SystemCapability.Location.Location.Lite + +| Name| Type| Readable| Writable| Description| +| -------- | -------- | -------- | -------- | -------- | +| types | Array<string> | Yes| No| Available location types, ['gps', 'network']| + +## SubscribeLocationOption(deprecated) + +Defines the options for continuous location. + +> **NOTE** +> This API is deprecated since API version 9. You are advised to use [geoLocationManager.CurrentLocationRequest](js-apis-geoLocationManager.md#locationrequest). + +**Required permissions**: ohos.permission.LOCATION + +**System capability**: SystemCapability.Location.Location.Lite + +| Name| Type| Mandatory| Description| +| -------- | -------- | -------- | -------- | +| coordType | string | No| Coordinate system type. Available types can be obtained by **getSupportedCoordTypes**. The default type is **wgs84**.| +| success | (data: [GeolocationResponse](#geolocationresponsedeprecated)) => void | Yes| Called when the geographic location changes.| +| fail | (data: string, code: number) => void | No| Called when API call has failed.| + +**Return value of fail()** + +| Error Code| Description| +| -------- | -------- | +| 601 | Failed to obtain the required permission because the user rejected the request.| +| 602 | Permission not declared.| +| 801 | System location disabled.| diff --git "a/zh-cn/application-dev/application-test/zh-cn - \345\277\253\346\215\267\346\226\271\345\274\217.lnk" "b/zh-cn/application-dev/application-test/zh-cn - \345\277\253\346\215\267\346\226\271\345\274\217.lnk" new file mode 100644 index 0000000000000000000000000000000000000000..fae317d1eab231da36b56b6acad7275ca13f4fce Binary files /dev/null and "b/zh-cn/application-dev/application-test/zh-cn - \345\277\253\346\215\267\346\226\271\345\274\217.lnk" differ