Начиная с 27 марта 2025 г. мы рекомендуем использовать android-latest-release
вместо aosp-main
для создания и участия в AOSP. Дополнительные сведения см. в разделе Изменения в AOSP .
Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Справочник по структуре GpsMeasurementInterface
#include < gps.h >
Расширенный интерфейс для поддержки GPS-измерений.
Определение в строке 1982 файла gps.h.
Останавливает обновления из HAL и отменяет регистрацию процедур обратного вызова. После вызова остановки ранее зарегистрированные обратные вызовы должны считаться HAL недействительными. Если остановка вызывается без предшествующей инициализации, эта функция не должна выполнять никаких действий.
Определение в строке 2005 файла gps.h.
Инициализирует интерфейс и регистрирует процедуры обратного вызова в HAL. После успешного вызова «init» HAL должен начать предоставлять обновления на своем этапе.
Статус: GPS_MEASUREMENT_OPERATION_SUCCESS GPS_MEASUREMENT_ERROR_ALREADY_INIT — если обратный вызов уже зарегистрирован без соответствующего вызова «закрыть» GPS_MEASUREMENT_ERROR_GENERIC — если произошла какая-либо другая ошибка, ожидается, что HAL не будет генерировать никаких обновлений при возврате этого кода ошибки.
Определение в строке 1997 файла gps.h.
Установите sizeof(GpsMeasurementInterface)
Определение в строке 1984 файла gps.h.
Документация для этой структуры была создана из следующего файла:
- оборудование/libhardware/include/hardware/ gps.h
Контент и образцы кода на этой странице предоставлены по лицензиям. Java и OpenJDK – это зарегистрированные товарные знаки корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2025-07-29 UTC.
[[["Прост для понимания","easyToUnderstand","thumb-up"],["Помог мне решить мою проблему","solvedMyProblem","thumb-up"],["Другое","otherUp","thumb-up"]],[["Отсутствует нужная мне информация","missingTheInformationINeed","thumb-down"],["Слишком сложен/слишком много шагов","tooComplicatedTooManySteps","thumb-down"],["Устарел","outOfDate","thumb-down"],["Проблема с переводом текста","translationIssue","thumb-down"],["Проблемы образцов/кода","samplesCodeIssue","thumb-down"],["Другое","otherDown","thumb-down"]],["Последнее обновление: 2025-07-29 UTC."],[],[],null,["# Android Hardware Abstraction Layer: GpsMeasurementInterface Struct Reference\n\nGpsMeasurementInterface Struct Reference\n========================================\n\n[Data Fields](#pub-attribs) \nGpsMeasurementInterface 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_measurement_interface#a854352f53b148adc24983a58a1866d66) |\n| ||\n| int(\\* | [init](/reference/hal/struct_gps_measurement_interface#ab662b0cdfbead07de6273f5587f9608c) )( [GpsMeasurementCallbacks](/reference/hal/struct_gps_measurement_callbacks) \\*callbacks) |\n| ||\n| void(\\* | [close](/reference/hal/struct_gps_measurement_interface#a9736ff1cda7d1d558f5cd251e0049c49) )() |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nExtended interface for GPS Measurements support.\n\n\nDefinition at line\n[1982](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| void(\\* close)() |\n\n\nStops updates from the HAL, and unregisters the callback routines. After a call to stop, the previously registered callbacks must be considered invalid by the HAL. If stop is invoked without a previous 'init', this function should perform no work.\n\n\nDefinition at line\n[2005](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| int(\\* init)( [GpsMeasurementCallbacks](/reference/hal/struct_gps_measurement_callbacks) \\*callbacks) |\n\n\nInitializes the interface and registers the callback routines with the HAL. After a successful call to 'init' the HAL must begin to provide updates at its own phase.\n\n\nStatus: GPS_MEASUREMENT_OPERATION_SUCCESS GPS_MEASUREMENT_ERROR_ALREADY_INIT - if a callback has already been registered without a corresponding call to 'close' GPS_MEASUREMENT_ERROR_GENERIC - if any other error occurred, it is expected that the HAL will not generate any updates upon returning this error code.\n\n\nDefinition at line\n[1997](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(GpsMeasurementInterface)\n\n\nDefinition at line\n[1984](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)"]]