in Android Studio
public void SensorData() { SensorManager sensorManager= (SensorManager)currentActivity.getSystemService(Context.SENSOR_SERVICE); Sensor defaultacc = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); maxrange = defaultacc.getMaximumRange(); } maxrange indicates that the sensor can measure up to 39 ms ^ 2 However, the code below
public void onSensorChanged(SensorEvent event) { if(event.sensor.getType()== Sensor.TYPE_ACCELEROMETER){ float[] values= event.values; ax= values[0]; //Вот эти значения осей не доходят даже до 20 м/c^2 ay= values[1]; az= values[2]; } Shows the maximum results in 2 times less - no more than 19 kopecks m / c ^ 2
What's the matter? Is it possible to raise the threshold to 39 m / s ^ 2, as it is written in the information about the sensor? Tested on multiple phones.