Open topic with navigation
In order to conserve device power, applications should choose the slowest accelerometer update rate possible to achieve the desired result. Values available for setting the update rate are defined in
android.hardware.SensorManager and are listed below in order of decreasing update rate.
|Constant Name||Relative Speed|
A sample of setting the sensor update rate is shown below.
if (mSensorManager == null) mSensorManager = (SensorManager)getSystemService(SENSOR_SERVICE); if (mSensorManager != null) mSensorManager.registerListener( this, mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), SENSOR_DELAY_GAME );
Note that the 'delay' values are abstract, with values specific to a given device, and thus rates could vary significantly between different devices. The only way to guarantee a certain update rate is to measure the rate returned by a device at run time.
NVIDIA® GameWorks™ Documentation Rev. 1.0.200608 ©2014-2020. NVIDIA Corporation. All Rights Reserved.