[android-developers] Re: SensorEvent timestamp doesn't always update

2011-11-07 Thread markus
Hi again, sorry to spam. I just found the following note in http://developer.android.com/reference/android/hardware/SensorEventListener.html#onSensorChanged(android.hardware.SensorEvent) NOTE: The application doesn't own the event object passed as a parameter and therefore cannot hold on o it. Th

[android-developers] Re: SensorEvent timestamp doesn't always update

2011-11-07 Thread markus
Hi, I only saw your answer today, thanks for it. It appears do make a difference, now it works. I still don't get why, though. The method always gets invoked by the same thread (which I've checked by outputting Thread.currentThread().getName() to the log), so it doesn't get invoked concurrently (

[android-developers] Re: SensorEvent timestamp doesn't always update

2011-10-31 Thread josean1968
Hello, You have this: ... private SensorEvent lastEvent; ... @Override public void onSensorChanged(SensorEvent event) { if (lastEvent == null) { lastEvent = event; return; } Log.v(TAG, "dT [" + Thread.currentThread().getName() + "]