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
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 (
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() + "]
3 matches
Mail list logo