Strange sensor behavior

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

Strange sensor behavior

Postby Vi42526 » Fri May 27, 2011 5:58 pm

Hello. I'm using Android emulator together with OpenIntents Sensor Simulator. I call the method onSensorChanged() to wait for a change in temperature and then do something with it. The default temperature the Simulator displays is 17.5 (actually since this is a double it's something like 17.50000000000xyzw). The problem is that the temperature changes of itself. Even though the Simulator displays 17.5 there appears to be some changes in the temperature since the onSensorChanged() method is being called constantly. Is this a normal emulator behavior and what can I do about it?
Vi42526
Freshman
Freshman
 
Posts: 4
Joined: Sun May 15, 2011 5:55 pm

Top

Re: Strange sensor behavior

Postby Vi42526 » Sat May 28, 2011 4:59 pm

It seems that the onSensorChanged() method really doeas detect some tiny variations in sensors. I've tested the theory on a program another person made a few months ago and the behavior is the same, there are some fantom changes detected by the listener.
Vi42526
Freshman
Freshman
 
Posts: 4
Joined: Sun May 15, 2011 5:55 pm

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests