google-developer-training / android-advanced

Solution apps for the apps that students create as they work through the Advanced Android Development training course created by Google Developer Training.
Other
1.14k stars 1.09k forks source link

Advanced Android: [Advanced Android 03.1: Getting sensor data][4.5] #13

Open tejashbutani opened 4 years ago

tejashbutani commented 4 years ago

The issue I found in codelab on the mentioned topic is at this line "int sensorType = event.sensor.getType();" here "event" keyword get's out of scope.

I founded these issue in Lesson 03.1, Step 4.5

How to reproduce? Do same as given in codelab and would reproduce the error.

Versions Version 29 API 29

Solution to the problem: instead of word "Event" it can changed to "sensorEvent" as in method will resolve error.

codelab: advanced-android