Reputation: 1100
I have written some simple code for the Galaxy Tab 7 to show the TYPE_MAGNETIC_FIELD data. Unfortunately this does not provide any data.
I can see a TYPE_MAGNETIC_FIELD sensor (have checked it exists). I can successfully add a an event listener to it, however I never get any data from it. Other sensors work fine such as light and accelerometer. This is on a Galaxy Tab 7.
onSensorChanged(SensorEvent event)
is never fired for a case Sensor.TYPE_MAGNETIC_FIELD:
As such I get no data from the Magnetic Field Sensor.
Anyone else getting this problem or know of a solution to it ?
Many Thanks.
Upvotes: 2
Views: 926
Reputation: 28845
I also faced this problem. In my case a magnetic sensor didn't work. I made sure in it after installing some compass applications and https://play.google.com/store/apps/details?id=scd.atools.
Upvotes: 1