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.
    
  
  
    
  
  
  
  
    
  
  
    
    
    
  
  Tài liệu tham khảo về cấu trúc sensors_poll_device_1
 
  
   #include <
   
    sensors.h
   
   >
  
 
 
  
   |  | 
  
   | union { | 
  
   | struct
    
     sensors_poll_device_t
    
       
    
     v0 | 
  
   |  | 
  
   | struct { | 
  
   | struct
    
     hw_device_t
    
       
    
     common | 
  
   |  | 
  
   | int(*   
    
     activate
    
    )(struct
    
     sensors_poll_device_t *dev, int sensor_handle, int
 enabled)
 | 
  
   |  | 
  
   | int(*   
    
     setDelay
    
    )(struct
    
     sensors_poll_device_t *dev, int sensor_handle,
 int64_t sampling_period_ns)
 | 
  
   |  | 
  
   | int(*   
    
     poll
    
    )(struct
    
     sensors_poll_device_t *dev,
    
     sensors_event_t
    
    *data,
 int count)
 | 
  
   |  | 
  
   | } |  | 
  
   |  | 
  
   | }; |  | 
  
   |  | 
  
   | int(* | lô
    
    )(cấu trúc
    
     sensors_poll_device_1
    
    *dev, int sensor_handle, int flags, int64_t sampling_period_ns, int64_t max_report_latency_ns) | 
  
   |  | 
  
   | int(* | flush
    
    )(struct
    
     sensors_poll_device_1
    
    *dev, int sensor_handle) | 
  
   |  | 
  
   | int(* | inject_sensor_data
    
    )(struct
    
     sensors_poll_device_1
    
    *dev, const
    
     sensors_event_t
    
    *data) | 
  
   |  | 
  
   | void(* | reserved_procs
    
    [7])(void) | 
  
   |  | 
 
 
 
 
 
  
   Định nghĩa tại dòng 
    1301
    của tệp 
    sensors.h
   .
  
  
 
 
 
 
 
 
 
 
 
 
  
   
    
     | int(* batch)(struct
      
       sensors_poll_device_1
      
      *dev, int sensor_handle, int flags, int64_t sampling_period_ns, int64_t max_report_latency_ns) | 
   
   
  
  
 
 
 
 
 
 
 
 
 
 
 
 
  
  
   
    Trả về một mảng dữ liệu cảm biến.
   
   
    Định nghĩa tại dòng 
     1333
     của tệp 
     sensors.h
    .
   
   
  
 
 
 
  
   
    
     | void(* reserved_procs[7])(void) | 
   
   
  
  
 
 
 
  
  
   
    Đặt chu kỳ của sự kiện tính bằng nano giây cho một cảm biến nhất định. Nếu sampling_period_ns > max_delay, thì giá trị này sẽ bị cắt bớt thành max_delay và nếu sampling_period_ns < min_delay, thì giá trị này sẽ được thay thế bằng min_delay.
   
   
    Định nghĩa tại dòng 
     1327
     của tệp 
     sensors.h
    .
   
   
  
 
 
 
 
 Tài liệu cho cấu trúc này được tạo từ tệp sau:
 
  - 
   hardware/libhardware/include/hardware/
   
    sensors.h
   
  
 
 
  
  
  
 
  
    
    
      
    
    
  
       
    
    
  
  
  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."],[],[]]