openharmony_ci 51da659992 !1747 merge master into master
fix codex

Created-by: fjc1203206387
Commit-by: fjc1203206387
Merged-by: openharmony_ci
Description: ### 一、内容说明(相关的Issue)



### 二、建议测试周期和提测地址  
  建议测试完成时间:xxxx.xx.xx  
  投产上线时间:xxxx.xx.xx  
  提测地址:CI环境/压测环境  
  测试账号:  

### 三、变更内容
  * 3.1 关联PR列表

  * 3.2 数据库和部署说明  
    1. 常规更新 
    2. 重启unicorn
    3. 重启sidekiq
    4. 迁移任务:是否有迁移任务,没有写 "无"
    5. rake脚本:`bundle exec xxx RAILS_ENV = production`;没有写 "无"

  * 3.4 其他技术优化内容(做了什么,变更了什么)
    - 重构了 xxxx 代码
    - xxxx 算法优化


  * 3.5 废弃通知(什么字段、方法弃用?)



  * 3.6  后向不兼容变更(是否有无法向后兼容的变更?)


  
### 四、研发自测点(自测哪些?冒烟用例全部自测?)
  自测测试结论:


### 五、测试关注点(需要提醒QA重点关注的、可能会忽略的地方)
  检查点:

| 需求名称 | 是否影响xx公共模块 | 是否需要xx功能 | 需求升级是否依赖其他子产品 |
|------|------------|----------|---------------|
| xxx  | 否          | 需要       | 不需要           |
|      |            |          |               |

  接口测试:

  性能测试:

  并发测试:

  其他:



See merge request: openharmony/base_location!1747
2026-06-12 16:58:18 +08:00
2022-03-10 20:11:41 +08:00
2026-06-11 19:49:38 +08:00
2026-05-13 10:22:19 +08:00
2026-01-13 19:17:26 +08:00
2026-06-04 09:35:00 +08:00
2026-05-15 09:32:11 +08:00
cli
2026-05-22 09:28:04 +08:00
2026-05-19 20:29:00 +08:00
2024-05-23 09:44:45 +08:00
2023-06-21 17:29:33 +08:00
2022-03-10 20:29:11 +08:00
2022-03-10 21:34:46 +08:00
2025-10-27 12:11:59 +08:00
2025-10-27 12:11:59 +08:00

Location

Introduction

People take their mobile devices wherever they go. Mobile devices have become a necessity in people's daily routines, whether it be for looking at the weather forecast, browsing news, hailing a taxi, navigating, or recording data from a workout. All these activities are so much associated with the location services on mobile devices.

With the location awareness capability offered by OpenHarmony, mobile devices will be able to obtain real-time, accurate location data. Building location awareness into your application can also lead to a better contextual experience for application users.

Your application can call location-specific APIs to obtain the location information of a mobile device for offering location-based services such as drive navigation and motion track recording.

Basic Concepts

Location awareness helps determine where a mobile device locates. The system identifies the location of a mobile device with its coordinates, and uses location technologies such as Global Navigation Satellite System (GNSS) and network positioning (for example, base station positioning or WLAN/Bluetooth positioning) to provide diverse location-based services. 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

    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 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 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 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.

Figure 1 Location subsystem architecture

Directory Structure

/base/location/location   # Source code directory structure
  ├── figures             # Store the architecture diagram in readme
  ├── frameworks          # Location framework code
  ├── interfaces          # External interface
  ├── sa_profile          # SA's profile
  ├── services            # Directory of SA codes for location services
  ├── test                # Test Code Directory

Constraints

  • Your application can use the location function only after the user has granted the permission and turned on the function. If the location function is off, the system will not provide the location service for any application.

  • 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.

Usage

Available APIs

https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.geolocation.d.ts

Usage Guidelines

https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-geolocation.md

Repositories Involved

base_location

S
Description
暂无描述
Readme 33 MiB
Languages
C++ 99.7%
C 0.2%