自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
FlpGeofencingInterface 結構體參考資料
#include <
fused_location.h
>
支援 FLP_Geofencing 的擴充介面
定義位於檔案
fused_location.h
的
764
行。
void(* add_geofences)(int32_t number_of_geofences,
Geofence
**geofences)
|
void(* modify_geofence_option)(int32_t geofence_id,
GeofenceOptions
*options)
|
void(* pause_geofence)(int32_t geofence_id)
|
void(* remove_geofences)(int32_t number_of_geofences, int32_t *geofence_id)
|
移除地理圍欄清單。函式傳回後,系統不應傳送任何通知。參數:number_of_geofences - 需要新增的地理邊界數量。geofence_id - 指向要移除的地理邊界 ID 陣列的指標。
定義位於檔案
fused_location.h
的
819
行。
void(* resume_geofence)(int32_t geofence_id, int monitor_transitions)
|
繼續監控特定地理圍欄。參數:geofence_id - 地理圍欄的 ID。monitor_transitions - 要監控的轉換。位元 OR 運算的 FLP_GEOFENCE_TRANSITION_ENTERED、FLP_GEOFENCE_TRANSITION_EXITED 和 FLP_GEOFENCE_TRANSITION_UNCERTAIN。這會取代 add_geofence_area 呼叫中提供的相關值。
定義位於檔案
fused_location.h
的
801
行。
這個結構體的說明文件是由下列檔案產生:
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[[["容易理解","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-27 (世界標準時間)。"],[],[],null,["# Android Hardware Abstraction Layer: FlpGeofencingInterface Struct Reference\n\nFlpGeofencingInterface Struct Reference\n=======================================\n\n[Data Fields](#pub-attribs) \nFlpGeofencingInterface 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| size_t | [size](/reference/hal/struct_flp_geofencing_interface#a854352f53b148adc24983a58a1866d66) |\n| ||\n| void(\\* | [init](/reference/hal/struct_flp_geofencing_interface#afa3aa235f58ff4fce5e90098e18d3707) )( [FlpGeofenceCallbacks](/reference/hal/struct_flp_geofence_callbacks) \\*callbacks) |\n| ||\n| void(\\* | [add_geofences](/reference/hal/struct_flp_geofencing_interface#a6db3722bd6f441b0ce4e2433be2353fe) )(int32_t number_of_geofences, [Geofence](/reference/hal/struct_geofence) \\*\\*geofences) |\n| ||\n| void(\\* | [pause_geofence](/reference/hal/struct_flp_geofencing_interface#a850b900b8eabf9328ec853978936ed4f) )(int32_t geofence_id) |\n| ||\n| void(\\* | [resume_geofence](/reference/hal/struct_flp_geofencing_interface#af409f9b64a5b9b42a5417ae381fabc88) )(int32_t geofence_id, int monitor_transitions) |\n| ||\n| void(\\* | [modify_geofence_option](/reference/hal/struct_flp_geofencing_interface#a4c8fdb5d1b08fa3f65f53fb4ec6ea075) )(int32_t geofence_id, [GeofenceOptions](/reference/hal/struct_geofence_options) \\*options) |\n| ||\n| void(\\* | [remove_geofences](/reference/hal/struct_flp_geofencing_interface#a358dea1e39d7696aad6e4c19d8cb05df) )(int32_t number_of_geofences, int32_t \\*geofence_id) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nExtended interface for FLP_Geofencing support\n\n\nDefinition at line\n[764](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| void(\\* add_geofences)(int32_t number_of_geofences, [Geofence](/reference/hal/struct_geofence) \\*\\*geofences) |\n\n\nAdd a list of geofences. Parameters: number_of_geofences - The number of geofences that needed to be added. geofences - Pointer to array of pointers to\n[Geofence](/reference/hal/struct_geofence)\nstructure.\n\n\nDefinition at line\n[782](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| void(\\* init)( [FlpGeofenceCallbacks](/reference/hal/struct_flp_geofence_callbacks) \\*callbacks) |\n\n\nOpens the geofence interface and provides the callback routines to the implemenation of this interface. Once called you should respond by calling the flp_capabilities_callback in\n[FlpGeofenceCallbacks](/reference/hal/struct_flp_geofence_callbacks)\nto specify the capabilities that your implementation supports.\n\n\nDefinition at line\n[774](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| void(\\* modify_geofence_option)(int32_t geofence_id, [GeofenceOptions](/reference/hal/struct_geofence_options) \\*options) |\n\n\nModify a particular geofence option. Parameters: geofence_id - The id for the geofence. options - Various options associated with the geofence. See\n[GeofenceOptions](/reference/hal/struct_geofence_options)\nstructure for details.\n\n\nDefinition at line\n[810](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| void(\\* pause_geofence)(int32_t geofence_id) |\n\n\nPause monitoring a particular geofence. Parameters: geofence_id - The id for the geofence.\n\n\nDefinition at line\n[789](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| void(\\* remove_geofences)(int32_t number_of_geofences, int32_t \\*geofence_id) |\n\n\nRemove a list of geofences. After the function returns, no notifications should be sent. Parameter: number_of_geofences - The number of geofences that needed to be added. geofence_id - Pointer to array of geofence_ids to be removed.\n\n\nDefinition at line\n[819](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| void(\\* resume_geofence)(int32_t geofence_id, int monitor_transitions) |\n\n\nResume monitoring a particular geofence. Parameters: geofence_id - The id for the geofence. monitor_transitions - Which transitions to monitor. Bitwise OR of FLP_GEOFENCE_TRANSITION_ENTERED, FLP_GEOFENCE_TRANSITION_EXITED and FLP_GEOFENCE_TRANSITION_UNCERTAIN. This supersedes the value associated provided in the add_geofence_area call.\n\n\nDefinition at line\n[801](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| size_t size |\n\n\nset to sizeof(FlpGeofencingInterface)\n\n\nDefinition at line\n[766](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)"]]