<Android Development> Android System Development-GNSS Process Analysis and Implementation

<Android Development> Android System Development-GNSS Process Analysis and Implementation

Foreword
The GNSS function is essential for Android devices. Mobile phones, electronic watches, cars and other devices all need positioning information. GNSS involves satellite systems such as Beidou, GPS, and Galileo. GNSS equipment obtains satellite information and transmits it to upper-layer applications through related service programs. The following explains the functions of the middle part of GNSS and related service programs related to GNSS in the Android system.

The overall process of GNSS is as follows:
GNSS device → serial port (or SPI/IIC, etc.) → serial port (or SPI/IIC, etc.) driver → HAL layer → JNI layer → java service layer → upper application APP

GNSS device: specific GNSS chip or module device;
serial port (or SPI/IIC, etc.): generally only need to add a device tree node;
serial port (or SPI/IIC, etc.) driver: Generally, the source code will come with such commonly used drivers ;
HAL layer: General module equipment manufacturers will provide;
JNI layer: General module equipment manufacturers will provide, together with the HAL layer;
java service layer: Android system comes with;
upper application APP: user development;

1 The java service layer of GNSS
Let's first analyze the java service layer part. This part is provided by the Android system or the code baseline manufacturer will modify it and release it together with the Android source code.

1.1 GNSS java service startup entry
Add location service in SystemServer.java and enable it through systemrunning; the process is as follows:
run@SystemServer → startOtherServices() → locationF.systemRunning()

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324486590&siteId=291194637