Solution apps for the apps that students create as they work through the Advanced Android Development training course created by Google Developer Training.
Describe the problem
In the light of the previous code lines the code snippets
int sensorType = event.sensor.getType();
and
float currentValue = event.values[0];
should be clearly written as
int sensorType = sensorEvent.sensor.getType();
and
float currentValue = sensorEvent.values[0];
To allow comfortable copy-pasting without looking for the source of the error message :)
Describe the problem In the light of the previous code lines the code snippets int sensorType = event.sensor.getType(); and float currentValue = event.values[0]; should be clearly written as int sensorType = sensorEvent.sensor.getType(); and float currentValue = sensorEvent.values[0]; To allow comfortable copy-pasting without looking for the source of the error message :)
In which lesson and step of the codelab can this issue be found? https://developer.android.com/codelabs/advanced-android-training-sensor-data#3 Advanced Android 03.1: Getting sensor data steps 5 and 6
How to reproduce? What are the exact steps to reproduce the problem?
Versions
Additional information probably just an educational missprint :))
codelab: advanced-android