A partir del 27 de marzo de 2025, te recomendamos que uses android-latest-release
en lugar de aosp-main
para compilar y contribuir a AOSP. Para obtener más información, consulta Cambios en AOSP.
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Referencia de la estructura GeofenceOptions
#include <
fused_location.h
>
Opciones de
geovallado
Definición en la línea
714
del archivo
fused_location.h
.
Es el estado actual de la geovalla. Por ejemplo, si el sistema ya sabe que el usuario está dentro del geovallado, se establecerá como FLP_GEOFENCE_TRANSITION_ENTERED. En la mayoría de los casos, será FLP_GEOFENCE_TRANSITION_UNCERTAIN.
Definición en la línea
720
del archivo
fused_location.h
.
Transiciones que se deben supervisar OR a nivel de bits de FLP_GEOFENCE_TRANSITION_ENTERED, FLP_GEOFENCE_TRANSITION_EXITED y FLP_GEOFENCE_TRANSITION_UNCERTAIN.
Definición en la línea
727
del archivo
fused_location.h
.
int notification_responsivenes_ms
|
Define la descripción del mejor esfuerzo de la rapidez con la que se debe llamar a la devolución de llamada cuando se activa la transición asociada con el
geovallado
. Por ejemplo, si se establece en 1,000 milisegundos con FLP_GEOFENCE_TRANSITION_ENTERED, se debe llamar a la devolución de llamada 1,000 milisegundos después de ingresar al geovallado. Este parámetro se define en milisegundos. NOTA: No debes confundir esto con la velocidad a la que se sondea el GPS. Se acepta variar de forma dinámica la tasa de muestreo del GPS por motivos de ahorro de energía, por lo que la tasa de muestreo puede ser más rápida o más lenta.
Definición en la línea
741
del archivo
fused_location.h
.
Son las fuentes que se usarán para supervisar las geovallas. Es un OR BÍNDICO de las marcas FLP_TECH_MASK.
Definición en la línea
753
del archivo
fused_location.h
.
Es el límite de tiempo después del cual se debe activar la transición UNCERTAIN. Este parámetro se define en milisegundos.
Definición en la línea
747
del archivo
fused_location.h
.
La documentación de esta struct se generó a partir del siguiente archivo:
El contenido y las muestras de código que aparecen en esta página están sujetas a las licencias que se describen en la Licencia de Contenido. Java y OpenJDK son marcas registradas de Oracle o sus afiliados.
Última actualización: 2025-07-27 (UTC)
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Falta la información que necesito","missingTheInformationINeed","thumb-down"],["Muy complicado o demasiados pasos","tooComplicatedTooManySteps","thumb-down"],["Desactualizado","outOfDate","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Problema con las muestras o los códigos","samplesCodeIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-07-27 (UTC)"],[],[],null,["# Android Hardware Abstraction Layer: GeofenceOptions Struct Reference\n\nGeofenceOptions Struct Reference\n================================\n\n[Data Fields](#pub-attribs) \nGeofenceOptions Struct Reference \n\n`\n#include \u003c\n`[fused_location.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)`\n\u003e\n`\n\n|----------|-----------------------------------------------------------------------------------------------------------|\n| Data Fields ----------- ||\n| int | [last_transition](/reference/hal/struct_geofence_options#ac9f3044df5a350d9a141c36631daa4d8) |\n| ||\n| int | [monitor_transitions](/reference/hal/struct_geofence_options#a0c48726615ba0e8f18e47cbe3d6e7873) |\n| ||\n| int | [notification_responsivenes_ms](/reference/hal/struct_geofence_options#a759888e878e11256a8021d3cd3d8e12a) |\n| ||\n| int | [unknown_timer_ms](/reference/hal/struct_geofence_options#a2d1b6a36f124a618cbebc3f79977233b) |\n| ||\n| uint32_t | [sources_to_use](/reference/hal/struct_geofence_options#a352dd652f7b9c6033433ad53089fe281) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\n[Geofence](/reference/hal/struct_geofence)\nOptions\n\n\nDefinition at line\n[714](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)\nof file\n[fused_location.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)\n.\n\nField Documentation\n-------------------\n\n\n|---------------------|\n| int last_transition |\n\n\nThe current state of the geofence. For example, if the system already knows that the user is inside the geofence, this will be set to FLP_GEOFENCE_TRANSITION_ENTERED. In most cases, it will be FLP_GEOFENCE_TRANSITION_UNCERTAIN.\n\n\nDefinition at line\n[720](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)\nof file\n[fused_location.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)\n.\n\n|-------------------------|\n| int monitor_transitions |\n\n\nTransitions to monitor. Bitwise OR of FLP_GEOFENCE_TRANSITION_ENTERED, FLP_GEOFENCE_TRANSITION_EXITED and FLP_GEOFENCE_TRANSITION_UNCERTAIN.\n\n\nDefinition at line\n[727](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)\nof file\n[fused_location.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)\n.\n\n|-----------------------------------|\n| int notification_responsivenes_ms |\n\n\nDefines the best-effort description of how soon should the callback be called when the transition associated with the\n[Geofence](/reference/hal/struct_geofence)\nis triggered. For instance, if set to 1000 millseconds with FLP_GEOFENCE_TRANSITION_ENTERED, the callback should be called 1000 milliseconds within entering the geofence. This parameter is defined in milliseconds. NOTE: This is not to be confused with the rate that the GPS is polled at. It is acceptable to dynamically vary the rate of sampling the GPS for power-saving reasons; thus the rate of sampling may be faster or slower than this.\n\n\nDefinition at line\n[741](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)\nof file\n[fused_location.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)\n.\n\n|-------------------------|\n| uint32_t sources_to_use |\n\n\nThe sources to use for monitoring geofences. Its a BITWISE-OR of FLP_TECH_MASK flags.\n\n\nDefinition at line\n[753](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)\nof file\n[fused_location.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)\n.\n\n|----------------------|\n| int unknown_timer_ms |\n\n\nThe time limit after which the UNCERTAIN transition should be triggered. This paramter is defined in milliseconds.\n\n\nDefinition at line\n[747](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)\nof file\n[fused_location.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)\n.\n\n*** ** * ** ***\n\nThe documentation for this struct was generated from the following file:\n\n- hardware/libhardware/include/hardware/ [fused_location.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)"]]