Skip to content

Most visited

Recently visited

navigation

ASensorEvent Struct Reference

ASensorEvent Struct Reference

#include <sensor.h>

Data Fields

int32_t version
 
int32_t sensor
 
int32_t type
 
int32_t reserved0
 
int64_t timestamp
 
union {
   union {
      float   data [16]
 
      ASensorVector   vector
 
      ASensorVector   acceleration
 
      ASensorVector   magnetic
 
      float   temperature
 
      float   distance
 
      float   light
 
      float   pressure
 
      float   relative_humidity
 
      AUncalibratedEvent   uncalibrated_gyro
 
      AUncalibratedEvent   uncalibrated_magnetic
 
      AMetaDataEvent   meta_data
 
      AHeartRateEvent   heart_rate
 
      ADynamicSensorEvent   dynamic_sensor_meta
 
      AAdditionalInfoEvent   additional_info
 
   } 
 
   union {
      uint64_t   data [8]
 
      uint64_t   step_counter
 
   }   u64
 
}; 
 
uint32_t flags
 
int32_t reserved1 [3]
 

Field Documentation

◆ @63

union { ... }

◆ acceleration

ASensorVector acceleration

◆ additional_info

AAdditionalInfoEvent additional_info

◆ data [1/2]

float data[16]

◆ data [2/2]

uint64_t data[8]

◆ distance

float distance

◆ dynamic_sensor_meta

ADynamicSensorEvent dynamic_sensor_meta

◆ flags

uint32_t flags

◆ heart_rate

AHeartRateEvent heart_rate

◆ light

float light

◆ magnetic

ASensorVector magnetic

◆ meta_data

AMetaDataEvent meta_data

◆ pressure

float pressure

◆ relative_humidity

float relative_humidity

◆ reserved0

int32_t reserved0

◆ reserved1

int32_t reserved1[3]

◆ sensor

int32_t sensor

◆ step_counter

uint64_t step_counter

◆ temperature

float temperature

◆ timestamp

int64_t timestamp

◆ type

int32_t type

◆ u64

union { ... } u64

◆ uncalibrated_gyro

AUncalibratedEvent uncalibrated_gyro

◆ uncalibrated_magnetic

AUncalibratedEvent uncalibrated_magnetic

◆ vector

ASensorVector vector

◆ version

int32_t version

The documentation for this struct was generated from the following file:
This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience. (April 2018 — Developer Survey)