提交 7864c3d8 编写于 作者: G Gloria

Update docs against link errors

Signed-off-by: wusongqing<wusongqing@huawei.com>
上级 a2664050
...@@ -84,7 +84,7 @@ The following table describes the application development paths obtained from co ...@@ -84,7 +84,7 @@ The following table describes the application development paths obtained from co
| tempDir | string | Yes| No| Temporary file directory of the application.<br>Files in this directory are deleted after the application is uninstalled.| | tempDir | string | Yes| No| Temporary file directory of the application.<br>Files in this directory are deleted after the application is uninstalled.|
| filesDir | string | Yes| No| File directory of the application on the internal storage.<br>Files in this directory may be synchronized to other directories during application migration or backup.| | filesDir | string | Yes| No| File directory of the application on the internal storage.<br>Files in this directory may be synchronized to other directories during application migration or backup.|
| databaseDir | string | Yes| No| Storage directory of the local database.| | databaseDir | string | Yes| No| Storage directory of the local database.|
| bundleCodeDir | string | Yes| No| Installation directory of the application on the internal storage. A resource file cannot be accessed by combining paths. Use [Resource Manager](js-apis-resource-manager.md) to access it. | | bundleCodeDir | string | Yes| No| Installation directory of the application on the internal storage. A resource file cannot be accessed by combining paths. Use [Resource Manager](../reference/apis/js-apis-resource-manager.md) to access it. |
| distributedFilesDir | string | Yes| No| Storage directory of distributed application data files.| | distributedFilesDir | string | Yes| No| Storage directory of distributed application data files.|
| preferencesDir | string | Yes| Yes| Preferences directory of the application.| | preferencesDir | string | Yes| Yes| Preferences directory of the application.|
......
...@@ -40,7 +40,7 @@ When switching an application from the FA model to the stage model, you must mig ...@@ -40,7 +40,7 @@ When switching an application from the FA model to the stage model, you must mig
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| name | Key name that identifies a data item. The value is a string with a maximum of 255 bytes.| name | None.| | name | Key name that identifies a data item. The value is a string with a maximum of 255 bytes.| name | None.|
| value | Value of the data item. The value is a string with a maximum of 255 bytes.| value | None.| | value | Value of the data item. The value is a string with a maximum of 255 bytes.| value | None.|
| extra | Format of the current custom data. The value is the resource value of **extra**.| resource | The field name is changed. For details, see [Table 4](#table 4-metadata-examples).| | extra | Format of the current custom data. The value is the resource value of **extra**.| resource | The field name is changed. For details, see [Table 4](#table-4-metadata-examples).|
**Table 4** metaData examples **Table 4** metaData examples
......
...@@ -15,15 +15,19 @@ Location awareness helps determine where a mobile device locates. The location s ...@@ -15,15 +15,19 @@ Location awareness helps determine where a mobile device locates. The location s
These advanced location technologies make it possible to obtain the accurate location of the mobile device, regardless of whether it is indoors or outdoors. These advanced location technologies make it possible to obtain the accurate location of the mobile device, regardless of whether it is indoors or outdoors.
- **Coordinate** - **Coordinate**
A coordinate describes a location on the earth using the longitude and latitude in reference to the World Geodetic Coordinate System 1984. A coordinate describes a location on the earth using the longitude and latitude in reference to the World Geodetic Coordinate System 1984.
- **GNSS positioning** - **GNSS positioning**
GNSS positioning locates a mobile device by using the location algorithm offered by the device chip to compute the location information provided by the Global Navigation Satellite System, for example, GPS, GLONASS, BeiDou, and Galileo. Whichever positioning system will be used during the location process depends on a hardware capability of the device. GNSS positioning locates a mobile device by using the location algorithm offered by the device chip to compute the location information provided by the Global Navigation Satellite System, for example, GPS, GLONASS, BeiDou, and Galileo. Whichever positioning system will be used during the location process depends on a hardware capability of the device.
- **Base station positioning** - **Base station positioning**
Base station positioning estimates the current location of a mobile device based on the location of the resident base station in reference to the neighboring base stations. This technology provides only a low accuracy and requires access to the cellular network. Base station positioning estimates the current location of a mobile device based on the location of the resident base station in reference to the neighboring base stations. This technology provides only a low accuracy and requires access to the cellular network.
- **WLAN or Bluetooth positioning** - **WLAN or Bluetooth positioning**
WLAN or Bluetooth positioning estimates the current location of a mobile device based on the locations of WLANs and Bluetooth devices that can be discovered by the device. The location accuracy of this technology depends on the distribution of fixed WLAN access points (APs) and Bluetooth devices around the device. A high density of WLAN APs and Bluetooth devices can produce a more accurate location result than base station positioning. This technology also requires access to the network. WLAN or Bluetooth positioning estimates the current location of a mobile device based on the locations of WLANs and Bluetooth devices that can be discovered by the device. The location accuracy of this technology depends on the distribution of fixed WLAN access points (APs) and Bluetooth devices around the device. A high density of WLAN APs and Bluetooth devices can produce a more accurate location result than base station positioning. This technology also requires access to the network.
### Working Principles ### Working Principles
...@@ -36,12 +40,6 @@ Your application can use the location function only after the user has granted t ...@@ -36,12 +40,6 @@ Your application can use the location function only after the user has granted t
Since the location information is considered sensitive, your application still needs to obtain the location access permission from the user even if the user has turned on the location function. The system will provide the location service for your application only after it has been granted the permission to access the device location information. Since the location information is considered sensitive, your application still needs to obtain the location access permission from the user even if the user has turned on the location function. The system will provide the location service for your application only after it has been granted the permission to access the device location information.
### Samples
The following sample is provided to help you better understand how to develop location services:
- [`Location`: Location (ArkTS) (API9)](https://gitee.com/openharmony/applications_app_samples/tree/master/device/Location)
## Applying for Location Permissions ## Applying for Location Permissions
...@@ -146,15 +144,15 @@ The following table lists the APIs used to obtain the device location informatio ...@@ -146,15 +144,15 @@ The following table lists the APIs used to obtain the device location informatio
``` ```
Sample code for initializing **requestInfo** for navigation: Sample code for initializing **requestInfo** for navigation:
```ts ```ts
let requestInfo = {'scenario': geoLocationManager.LocationRequestScenario.NAVIGATION, 'timeInterval': 0, 'distanceInterval': 0, 'maxAccuracy': 0}; let requestInfo = {'scenario': geoLocationManager.LocationRequestScenario.NAVIGATION, 'timeInterval': 0, 'distanceInterval': 0, 'maxAccuracy': 0};
``` ```
**Method 2:** **Method 2:**
If the predefined use cases do not meet your needs, you can also use the basic location priority policies provided by the system. If the predefined use cases do not meet your needs, you can also use the basic location priority policies provided by the system.
**Location priority policies** **Location priority policies**
...@@ -176,7 +174,7 @@ The following table lists the APIs used to obtain the device location informatio ...@@ -176,7 +174,7 @@ The following table lists the APIs used to obtain the device location informatio
} }
``` ```
Sample code for initializing **requestInfo** for the location accuracy priority policy: Sample code for initializing **requestInfo** for the location accuracy priority policy:
```ts ```ts
let requestInfo = {'priority': geoLocationManager.LocationRequestPriority.ACCURACY, 'timeInterval': 0, 'distanceInterval': 0, 'maxAccuracy': 0}; let requestInfo = {'priority': geoLocationManager.LocationRequestPriority.ACCURACY, 'timeInterval': 0, 'distanceInterval': 0, 'maxAccuracy': 0};
...@@ -246,6 +244,7 @@ The following table lists the APIs used for mutual conversion between coordinate ...@@ -246,6 +244,7 @@ The following table lists the APIs used for mutual conversion between coordinate
### How to Develop ### How to Develop
> **NOTE** > **NOTE**
>
> The **GeoConvert** instance needs to access backend services to obtain information. Therefore, before performing the following steps, ensure that your device is connected to the network. > The **GeoConvert** instance needs to access backend services to obtain information. Therefore, before performing the following steps, ensure that your device is connected to the network.
1. Import the **geoLocationManager** module by which you can implement all APIs related to the geocoding and reverse geocoding conversion capabilities. 1. Import the **geoLocationManager** module by which you can implement all APIs related to the geocoding and reverse geocoding conversion capabilities.
...@@ -255,7 +254,8 @@ The following table lists the APIs used for mutual conversion between coordinate ...@@ -255,7 +254,8 @@ The following table lists the APIs used for mutual conversion between coordinate
``` ```
2. Check whether the **geoCoder** service is available. 2. Check whether the **geoCoder** service is available.
- Call **isGeoServiceAvailable** to check whether the **geoCoder** service is available. If the service is available, go to step 3.
Call **isGeoServiceAvailable** to check whether the **geoCoder** service is available. If the service is available, go to step 3.
```ts ```ts
import geoLocationManager from '@ohos.geoLocationManager'; import geoLocationManager from '@ohos.geoLocationManager';
...@@ -386,7 +386,7 @@ The following table lists the APIs used for geofencing. For details, see [Geoloc ...@@ -386,7 +386,7 @@ The following table lists the APIs used for geofencing. For details, see [Geoloc
4. Call [getWantAgent()](../reference/apis/js-apis-app-ability-wantAgent.md#wantagentgetwantagent) to create a **WantAgent** object. 4. Call [getWantAgent()](../reference/apis/js-apis-app-ability-wantAgent.md#wantagentgetwantagent) to create a **WantAgent** object.
After obtaining the **WantAgent** object, call the geofencing API to add a geofence. After obtaining the **WantAgent** object, call the geofencing API to add a geofence.
```ts ```ts
// Create a WantAgent object. // Create a WantAgent object.
......
...@@ -8,7 +8,7 @@ The vibrator service is built on the native vibrator service, bolstered by the l ...@@ -8,7 +8,7 @@ The vibrator service is built on the native vibrator service, bolstered by the l
The vibrator is a Misc device that consists of four modules: Vibrator API, Vibrator Framework, Vibrator Service, and HDF layer. The vibrator is a Misc device that consists of four modules: Vibrator API, Vibrator Framework, Vibrator Service, and HDF layer.
**Figure 1** Vibrator in Misc devices **Figure 1** Vibrator in Misc devices
![0752d302-aeb9-481a-bb8f-e5524eb61eeb](figures/0752d302-aeb9-481a-bb8f-e5524eb61eeb.png) ![0752d302-aeb9-481a-bb8f-e5524eb61eeb](figures/0752d302-aeb9-481a-bb8f-e5524eb61eeb.png)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册