Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1.66 KB

README.md

File metadata and controls

37 lines (28 loc) · 1.66 KB

harmony-location-demo

Table of Contents

Introduction

The Huawei location sample code encapsulates the Huawei location API. It provides a number of sample programs for your reference or use.

Getting Started

We also provide an example to demonstrate the use of the LocationKit SDK for HarmonyOS.
This example builds the system using Gradle.
First, demonstrate by cloning this code repository or downloading a zip package.
In DevEco Studio, use "Open an existing DevEco Studio project" and select the "harmony-location-demo" directory.
You can use the "gradlew signReleaseHap" command to build the project directly.

Installation

  1. Clone or download the project and open the downloaded folder in DevEco Studio.
  2. Use DevEco Studio to install the configured project on the device.

Supported Environments

HMS Core (APK) 6.0.0 or later has been installed on the Huawei Smartwatch.

Sample Code

1.Invoke requestLocationUpdates of FusedLocationProviderClient to add a location request. Code location in src/main/java/com/huawei/sample/harmony/location/slice/RequestLocationCallbackAbilitySlice.java

Result

License

harmony-location-demo is licensed under the Apache License, version 2.0.