Kể từ ngày 27 tháng 3 năm 2025, bạn nên sử dụng android-latest-release
thay vì aosp-main
để xây dựng và đóng góp cho AOSP. Để biết thêm thông tin, hãy xem phần Thay đổi đối với AOSP.
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tham chiếu cấu trúc GpsNavigationMessage
#include <
gps.h
>
Cấu trúc cũ để biểu thị thông báo điều hướng GPS (hoặc một mảnh của thông báo đó). Không dùng nữa, sẽ bị xoá trong bản phát hành Android tiếp theo. Thay vào đó, hãy sử dụng
GnssNavigationMessage
.
Định nghĩa tại dòng
2014
của tệp
gps.h
.
đặt thành sizeof(GpsNavigationMessage)
Định nghĩa tại dòng
2016
của tệp
gps.h
.
Tài liệu cho cấu trúc này được tạo từ tệp sau:
-
hardware/libhardware/include/hardware/
gps.h
Nội dung và mã mẫu trên trang này phải tuân thủ các giấy phép như mô tả trong phần Giấy phép nội dung. Java và OpenJDK là nhãn hiệu hoặc nhãn hiệu đã đăng ký của Oracle và/hoặc đơn vị liên kết của Oracle.
Cập nhật lần gần đây nhất: 2025-07-27 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-27 UTC."],[],[],null,["# Android Hardware Abstraction Layer: GpsNavigationMessage Struct Reference\n\nGpsNavigationMessage Struct Reference\n=====================================\n\n[Data Fields](#pub-attribs) \nGpsNavigationMessage Struct Reference \n\n`\n#include \u003c\n`[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)`\n\u003e\n`\n\n|----------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------|\n| Data Fields ----------- ||\n| size_t | [size](/reference/hal/struct_gps_navigation_message#a854352f53b148adc24983a58a1866d66) |\n| ||\n| int8_t | [prn](/reference/hal/struct_gps_navigation_message#a3ffcc691f30833f5242fbcd5361f02a0) |\n| ||\n| [GpsNavigationMessageType](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h) | [type](/reference/hal/struct_gps_navigation_message#af19a32895b89fa1df99eeff0fee64041) |\n| ||\n| [NavigationMessageStatus](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h) | [status](/reference/hal/struct_gps_navigation_message#a8e3b7677cbc7162abe1d1624c8fecc49) |\n| ||\n| int16_t | [message_id](/reference/hal/struct_gps_navigation_message#a73c0dbf15262619a62617280bcef653b) |\n| ||\n| int16_t | [submessage_id](/reference/hal/struct_gps_navigation_message#ad7288f28c8c5aa93cda8e6b1c23d06b3) |\n| ||\n| size_t | [data_length](/reference/hal/struct_gps_navigation_message#ac710ca74549e34346fcf7c3a81c63ea3) |\n| ||\n| uint8_t \\* | [data](/reference/hal/struct_gps_navigation_message#abe222f6d3581e7920dcad5306cc906a8) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nLegacy struct to represents a GPS navigation message (or a fragment of it). Deprecated, to be removed in the next Android release. Use\n[GnssNavigationMessage](/reference/hal/struct_gnss_navigation_message)\ninstead.\n\n\nDefinition at line\n[2014](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\nof file\n[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\n.\n\nField Documentation\n-------------------\n\n\n|----------------|\n| uint8_t\\* data |\n\n\nDefinition at line\n[2023](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\nof file\n[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\n.\n\n|--------------------|\n| size_t data_length |\n\n\nDefinition at line\n[2022](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\nof file\n[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\n.\n\n|--------------------|\n| int16_t message_id |\n\n\nDefinition at line\n[2020](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\nof file\n[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\n.\n\n|------------|\n| int8_t prn |\n\n\nDefinition at line\n[2017](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\nof file\n[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\n.\n\n|-------------|\n| size_t size |\n\n\nset to sizeof(GpsNavigationMessage)\n\n\nDefinition at line\n[2016](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\nof file\n[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\n.\n\n|----------------------------------------------------------------------------------------------------------------------------------|\n| [NavigationMessageStatus](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h) status |\n\n\nDefinition at line\n[2019](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\nof file\n[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\n.\n\n|-----------------------|\n| int16_t submessage_id |\n\n\nDefinition at line\n[2021](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\nof file\n[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\n.\n\n|---------------------------------------------------------------------------------------------------------------------------------|\n| [GpsNavigationMessageType](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h) type |\n\n\nDefinition at line\n[2018](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\nof file\n[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\n.\n\n*** ** * ** ***\n\nThe documentation for this struct was generated from the following file:\n\n- hardware/libhardware/include/hardware/ [gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)"]]