[mono-android] Sensor - OnAccuracyChanged - accuracy
Wally McClure
theevilprogrammer at hotmail.com
Fri Mar 18 10:42:24 EDT 2011
**I hate sender's remorse**
Is this the current correct way to handle an accuracy change (using the accelerometer)?
public void OnAccuracyChanged(Sensor sensor, int accuracy)
{
if (sensor.Type == Android.Hardware.SensorType.Accelerometer)
{
if (Android.Hardware.SensorStatus.AccuracyHigh == (Android.Hardware.SensorStatus)accuracy)
{
}
}
}
From: theevilprogrammer at hotmail.com
To: monodroid at lists.ximian.com
Date: Fri, 18 Mar 2011 10:37:58 -0400
Subject: [mono-android] Sensor - OnAccuracyChanged - accuracy
I'm looking at the sensors with the OnAccuracyChanged event. I see that it accepts an accuracy value as an int, so I assume that this is probably a set of predefined values. I was thinking that this should be an enum, however, that only works if the accuracy is predefined and can be assumed to not change. Do the accuracy values have a tendency to change? I'm reading Reto Meier's book and I get the impression that there are only 4 values that are returned. Should there be an enum handed in?
Wally
_______________________________________________ Monodroid mailing list Monodroid at lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/mailman/private/monodroid/attachments/20110318/8e44d4e2/attachment.html
More information about the Monodroid
mailing list