# hms-location-demo
**Repository Path**: hms-core/hms-location-demo
## Basic Information
- **Project Name**: hms-location-demo
- **Description**: 华为定位服务安卓示例代码。通过此代码可以帮助您快速了解华为定位服务所提供的客户端接口及其使用方法,提供集成定位服务的融合定位,地理围栏,活动识别等功能参考。
- **Primary Language**: Java
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 50
- **Forks**: 6
- **Created**: 2021-01-29
- **Last Updated**: 2025-09-02
## Categories & Tags
**Categories**: gis, harmony
**Tags**: None
## README
# HMS Core Location Kit Sample Code (Android)
English | [中文](README_ZH.md)
## Contents
* [Introduction](#Introduction)
* [Preparations](#Preparations)
* [Installation](#Installation)
* [Environment Requirements](#Environment-Requirements)
* [Result](#Result)
* [Technical Support](#Technical-Support)
* [License](#License)
## Introduction
The sample code encapsulates APIs of HMS Core Location Kit, and provides many sample programs for your reference or use.
## Preparations
The sample code is built using Gradle to demonstrate how to use the Location SDK for Android. First, download the sample code by cloning this repository or downloading the archived snapshot. In Android Studio, click **Open an existing Android Studio project** and select the directory where the **sample** file is located. You can use the **gradlew build** command to directly build the project. Then, you need to create an app in AppGallery Connect, obtain the **agconnect-services.json** file, and add it to the project. You also need to generate a signing certificate fingerprint, add the signing certificate file to the project, and add related configurations to the **build.gradle** file. For details, please refer to "Configuring App Information in AppGallery Connect" in the official development guide.
## Installation
1. Clone or download the project and open it using Android Studio or a compatible IDE.
2. Use the IDE to install the configured project on your device.
## Environment Requirements
A Huawei phone or tablet running EMUI 5.0 or later, or a non-Huawei phone running Android 5.1 or later.
## Result
## Technical Support
You can visit the [Reddit community](https://www.reddit.com/r/HuaweiDevelopers/) to obtain the latest information about HMS Core and communicate with other developers.
If you have any questions about the sample code, try the following:
- Visit [Stack Overflow](https://stackoverflow.com/questions/tagged/huawei-mobile-services?tab=Votes), submit your questions, and tag them with `huawei-mobile-services`. Huawei experts will answer your questions.
- Visit the HMS Core section in the [HUAWEI Developer Forum](https://forums.developer.huawei.com/forumPortal/en/home?fid=0101187876626530001?ha_source=hms1) and communicate with other developers.
If you encounter any issues when using the sample code, submit your [issues](https://github.com/HMS-Core/hms-location-demo/issues) or submit a [pull request](https://github.com/HMS-Core/hms-location-demo/pulls).
## License
The sample code is licensed under [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).