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 AGpsInterface_v1
#include <
gps_internal.h
>
Giao diện mở rộng cũ để hỗ trợ AGPS. Hãy xem AGpsInterface_v2 để biết thêm thông tin.
Định nghĩa tại dòng
84
của tệp
gps_internal.h
.
int(* data_conn_closed)()
|
int(* data_conn_failed)()
|
int(* data_conn_open)(const char *apn)
|
int(* set_server)(
AGpsType
type, const char *hostname, int port)
|
đặt thành sizeof(AGpsInterface_v1)
Định nghĩa tại dòng
86
của tệp
gps_internal.h
.
Tài liệu cho cấu trúc này được tạo từ tệp sau:
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: AGpsInterface_v1 Struct Reference\n\nAGpsInterface_v1 Struct Reference\n=================================\n\n[Data Fields](#pub-attribs) \nAGpsInterface_v1 Struct Reference \n\n`\n#include \u003c\n`[gps_internal.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps_internal.h)`\n\u003e\n`\n\n|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Data Fields ----------- ||\n| size_t | [size](/reference/hal/struct_a_gps_interface__v1#a854352f53b148adc24983a58a1866d66) |\n| ||\n| void(\\* | [init](/reference/hal/struct_a_gps_interface__v1#a72feb2719b8809d7064eac96b4a5fb8f) )( [AGpsCallbacks](/reference/hal/struct_a_gps_callbacks) \\*callbacks) |\n| ||\n| int(\\* | [data_conn_open](/reference/hal/struct_a_gps_interface__v1#a591c421c92b4628d493f1ae55a1ab6d9) )(const char \\*apn) |\n| ||\n| int(\\* | [data_conn_closed](/reference/hal/struct_a_gps_interface__v1#aa413d6d9fe05cd2bd9c1f531c3f37bf7) )() |\n| ||\n| int(\\* | [data_conn_failed](/reference/hal/struct_a_gps_interface__v1#a5b66d04a0b8ab39e01d3f3ec4e6e0c97) )() |\n| ||\n| int(\\* | [set_server](/reference/hal/struct_a_gps_interface__v1#a9723f353ecadc2b585cd58f0c60012ae) )( [AGpsType](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h) type, const char \\*hostname, int port) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nLegacy extended interface for AGPS support. See AGpsInterface_v2 for more information.\n\n\nDefinition at line\n[84](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps_internal.h)\nof file\n[gps_internal.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps_internal.h)\n.\n\nField Documentation\n-------------------\n\n\n|----------------------------|\n| int(\\* data_conn_closed)() |\n\n\nDefinition at line\n[89](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps_internal.h)\nof file\n[gps_internal.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps_internal.h)\n.\n\n|----------------------------|\n| int(\\* data_conn_failed)() |\n\n\nDefinition at line\n[90](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps_internal.h)\nof file\n[gps_internal.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps_internal.h)\n.\n\n|------------------------------------------|\n| int(\\* data_conn_open)(const char \\*apn) |\n\n\nDefinition at line\n[88](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps_internal.h)\nof file\n[gps_internal.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps_internal.h)\n.\n\n|------------------------------------------------------------------------------------|\n| void(\\* init)( [AGpsCallbacks](/reference/hal/struct_a_gps_callbacks) \\*callbacks) |\n\n\nDefinition at line\n[87](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps_internal.h)\nof file\n[gps_internal.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps_internal.h)\n.\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| int(\\* set_server)( [AGpsType](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h) type, const char \\*hostname, int port) |\n\n\nDefinition at line\n[91](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps_internal.h)\nof file\n[gps_internal.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps_internal.h)\n.\n\n|-------------|\n| size_t size |\n\n\nset to sizeof(AGpsInterface_v1)\n\n\nDefinition at line\n[86](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps_internal.h)\nof file\n[gps_internal.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps_internal.h)\n.\n\n*** ** * ** ***\n\nThe documentation for this struct was generated from the following file:\n\n- hardware/libhardware/include/hardware/ [gps_internal.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps_internal.h)"]]