Wednesday, July 20, 2011

[android-developers] Re: Compass and Sensor.Type_Orientation

Based on cost/benefit, I think I am happy with
Sensor.Type_Orientation, as long as it doesn't fail catastrophically.

The stack traces, though, clearly show an ANR in native method
SensorManager.sensors_enable_sensor, which is a new method in Android
2.3.

I wonder if that method somewhere has code like this.
if(sensor==Sensor.TYPE_ORIENTATION)
{
//be sure and punish the developer for calling a deprecated sensor
while(1)
{
//this infinite loop should do the trick.
}
}

But this may have nothing to do with Sensor.TYPE_ORIENTATION. I am
registering listeners in onResume and unregistering listeners in
onPause, as a good citizen should.
Is onPause and onResume happening too fast for that device to handle?
Can the device not handle SENSOR_DELAY_UI?

At the moment I am a bit lost.

Nathan

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate