Mulai 27 Maret 2025, sebaiknya gunakan android-latest-release
, bukan aosp-main
, untuk mem-build dan berkontribusi pada AOSP. Untuk mengetahui informasi selengkapnya, lihat Perubahan pada AOSP.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Referensi Struct FlpBatchOptions
#include <
fused_location.h
>
Opsi dengan API FLP pengelompokan
Definisi di baris
258
file
fused_location.h
.
FLP_BATCH_WAKEUP_ON_FIFO_FULL - Jika disetel, hardware akan mengaktifkan AP saat buffering penuh. Jika tidak ditetapkan, hardware akan menghapus objek lokasi terlama.
FLP_BATCH_CALLBACK_ON_LOCATION_FIX - Jika ditetapkan, callback lokasi akan dipanggil setiap kali ada perbaikan lokasi. Lapisan atas (pemanggil) bertanggung jawab untuk menonaktifkannya, jika mengetahui bahwa AP mungkin akan tidur. Jika bit ini aktif di tengah sesi pengelompokan, pengelompokan harus dilanjutkan saat perbaikan lokasi dilaporkan secara real time.
Flag lain yang akan di-OR bitwise pada masa mendatang.
Definisi di baris
284
dari file
fused_location.h
.
double max_power_allocation_mW
|
Daya maksimum dalam mW yang dapat digunakan oleh penerapan yang mendasarinya untuk panggilan pengelompokan ini. Jika max_power_allocation_mW adalah 0, hanya perbaikan yang dihasilkan tanpa biaya daya tambahan yang akan dilaporkan.
Definisi di baris
265
dari file
fused_location.h
.
Frekuensi lokasi yang perlu dikelompokkan dalam nanodetik.
Definisi di baris
290
dari file
fused_location.h
.
float smallest_displacement_meters
|
Perpindahan terkecil antara lokasi yang dilaporkan dalam meter.
Jika ditetapkan ke 0, Anda harus melaporkan lokasi pada interval yang diminta meskipun perangkat tidak bergerak. Jika positif, Anda dapat menggunakan parameter ini sebagai petunjuk untuk menghemat daya (misalnya, periode throttling lokasi jika pengguna belum melakukan perjalanan mendekati nilai minimum perpindahan). Bahkan nilai positif kecil dapat ditafsirkan bahwa Anda tidak perlu menghitung lokasi saat perangkat tidak bergerak.
Anda tidak perlu memfilter penayangan lokasi berdasarkan parameter ini. Lokasi dapat ditayangkan meskipun memiliki perpindahan yang lebih kecil dari yang diminta. Parameter ini dapat diabaikan dengan aman dengan mengorbankan potensi penghematan daya.
Definisi di baris
307
dari file
fused_location.h
.
OR Bitwise dari FLP_TECH_MASKS yang akan digunakan
Definisi di baris
268
dari file
fused_location.h
.
Dokumentasi untuk struct ini dibuat dari file berikut:
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-27 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-27 UTC."],[],[],null,["# Android Hardware Abstraction Layer: FlpBatchOptions Struct Reference\n\nFlpBatchOptions Struct Reference\n================================\n\n[Data Fields](#pub-attribs) \nFlpBatchOptions 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| double | [max_power_allocation_mW](/reference/hal/struct_flp_batch_options#ae300330f3b7cb10809a7e67735e02410) |\n| ||\n| uint32_t | [sources_to_use](/reference/hal/struct_flp_batch_options#a352dd652f7b9c6033433ad53089fe281) |\n| ||\n| uint32_t | [flags](/reference/hal/struct_flp_batch_options#a773b39d480759f67926cb18ae2219281) |\n| ||\n| int64_t | [period_ns](/reference/hal/struct_flp_batch_options#a9d1968cb4382e5653d8d5a31c8a2ee6b) |\n| ||\n| float | [smallest_displacement_meters](/reference/hal/struct_flp_batch_options#a1b30671f2f5bdad79f87fdd30f6bb8a8) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nOptions with the batching FLP APIs\n\n\nDefinition at line\n[258](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| uint32_t flags |\n\n\nFLP_BATCH_WAKEUP_ON_FIFO_FULL - If set the hardware will wake up the AP when the buffer is full. If not set, the hardware will drop the oldest location object.\n\n\nFLP_BATCH_CALLBACK_ON_LOCATION_FIX - If set the location callback will be called every time there is a location fix. Its the responsibility of the upper layers (caller) to switch it off, if it knows that the AP might go to sleep. When this bit is on amidst a batching session, batching should continue while location fixes are reported in real time.\n\n\nOther flags to be bitwised ORed in the future.\n\n\nDefinition at line\n[284](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| double max_power_allocation_mW |\n\n\nMaximum power in mW that the underlying implementation can use for this batching call. If max_power_allocation_mW is 0, only fixes that are generated at no additional cost of power shall be reported.\n\n\nDefinition at line\n[265](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| int64_t period_ns |\n\n\nFrequency with which location needs to be batched in nano seconds.\n\n\nDefinition at line\n[290](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| float smallest_displacement_meters |\n\n\nThe smallest displacement between reported locations in meters.\n\n\nIf set to 0, then you should report locations at the requested interval even if the device is stationary. If positive, you can use this parameter as a hint to save power (e.g. throttling location period if the user hasn't traveled close to the displacement threshold). Even small positive values can be interpreted to mean that you don't have to compute location when the device is stationary.\n\n\nThere is no need to filter location delivery based on this parameter. Locations can be delivered even if they have a displacement smaller than requested. This parameter can safely be ignored at the cost of potential power savings.\n\n\nDefinition at line\n[307](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\nBitwise OR of the FLP_TECH_MASKS to use\n\n\nDefinition at line\n[268](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)"]]