1e41f4b71Sopenharmony_ci# Applying for Location Permissions 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ci## Scenario 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ciBefore using the capabilities provided by [Location Kit](../../reference/apis-location-kit/js-apis-geoLocationManager.md), check whether your application has been granted the permission to access the device location information. If not, your application needs to obtain the permission from the user. 6e41f4b71Sopenharmony_ci 7e41f4b71Sopenharmony_ciThe system provides the following location permission: 8e41f4b71Sopenharmony_ci 9e41f4b71Sopenharmony_ci- **ohos.permission.LOCATION**: used to obtain location accurate to meters. 10e41f4b71Sopenharmony_ci 11e41f4b71Sopenharmony_ci- **ohos.permission.APPROXIMATELY\_LOCATION**: used to obtain location accurate to 5 kilometers. 12e41f4b71Sopenharmony_ci 13e41f4b71Sopenharmony_ci- **ohos.permission.LOCATION_IN_BACKGROUND**: used to obtain location while the application is running at the background. 14e41f4b71Sopenharmony_ci 15e41f4b71Sopenharmony_ciFor details about the permissions required for each API of Location Kit, see [Location Kit](../../reference/apis-location-kit/js-apis-geoLocationManager.md). 16e41f4b71Sopenharmony_ci 17e41f4b71Sopenharmony_ci## How to Develop 18e41f4b71Sopenharmony_ci 19e41f4b71Sopenharmony_ci1. Declare the required permission in your application's configuration file. For details, see [Requesting User Authorization](../../security/AccessToken/request-user-authorization.md). 20e41f4b71Sopenharmony_ci 21e41f4b71Sopenharmony_ci2. If your application needs to access the device location when running in the foreground, declare the location permission as described in the following table. 22e41f4b71Sopenharmony_ci 23e41f4b71Sopenharmony_ci**Table 1** Description of location permissions 24e41f4b71Sopenharmony_ci 25e41f4b71Sopenharmony_ci| Permission| Declarable or Not| Location Accuracy| 26e41f4b71Sopenharmony_ci| -------- | -------- | -------- | 27e41f4b71Sopenharmony_ci| ohos.permission.APPROXIMATELY_LOCATION| Yes| Location accurate to 5 kilometers.| 28e41f4b71Sopenharmony_ci| ohos.permission.APPROXIMATELY_LOCATION and ohos.permission.LOCATION| Yes| Location accurate to meters.| 29e41f4b71Sopenharmony_ci 30e41f4b71Sopenharmony_ci3. If your application needs to access the device location when running in the background, declare the location permission as follows: 31e41f4b71Sopenharmony_ci 32e41f4b71Sopenharmony_ciIf your application needs to access the device location when running in the background, also request for the **ohos.permission.LOCATION_IN_BACKGROUND** permission or a continuous task of the LOCATION type in addition to the permission declared in step 2. 33e41f4b71Sopenharmony_ci 34e41f4b71Sopenharmony_ci- A user can grant the **ohos.permission.LOCATION_IN_BACKGROUND** permission for an application on the **Settings** page. For details, see [ohos.permission.LOCATION_IN_BACKGROUND](../../security/AccessToken/permissions-for-all.md#ohospermissionlocation_in_background). 35e41f4b71Sopenharmony_ci 36e41f4b71Sopenharmony_ci- For details about how to request for a continuous task, see [Continuous Task](../../task-management/continuous-task.md)<!--Del--> and [Continuous Task Development Example](../../performance/reasonable-running-backgroundTask.md#continuous-task)<!--DelEnd-->. 37e41f4b71Sopenharmony_ci 38e41f4b71Sopenharmony_ci 39e41f4b71Sopenharmony_ci<!--RP1--> 40e41f4b71Sopenharmony_ci<!--RP1End--> 41