Has anyone had experience using Accelerometer on Android devices

I ported a tilt game written in Corona from iOS to Android. The accelerometer was unbearably sluggish after I installed on my Android 2.2 device (LG Optimus). It was running fine even on 2nd gen iPod. (Sample rate 30Hz. I dropped it to 10Hz with the same result.)

Does anyone have similar experience? Is it very device dependent? What are the devices that are supposedly faster?

I know what you mean. I have the same issue. There should be a means to simply get the accelerometer values instead of the only mechanism being when subscribing to the event.

It behaves to me as if their event handing is buffering/queuing up the changes in some way. If I tilt my device heavily in one direction my character moves correctly, but then if I put it on a flat surface, it takes a long time before my character slows down. This change should be immediate, but instead I see a gradual slowing. This screams queuing/buffering to me. This needs to be reevaluated.

I would like a way on "enterFrame" just to get the current gravity values from their registers for instance. This should avoid the queuing/buffering due to event handling.

Cheers -- Tim.

Hey Guys.

I'm just wondering if there is any update on this.

I just downloaded the latest build for Windows and installed my corona accelerometer test app again on my HTC EVO and it still seems the accelerometer is buffering the events.

This is a real show stopper for me using corona on android and I have to look to other engines for better performance.

My app is pretty much a straight port from a flash app I wrote for the accelerometer and it responds immediately.

Is there a way to tell corona to only buffer X number of accelerometer events before cycling them in its queue? I don't know what else to do at this point. I would love to continue using corona but can't due to this.

Again, if I tilt in one direction for a few seconds and then go level, it will take it several seconds to respond to it. If I tilt in one direction for a few seconds and hard tilt in the other direction it will respond faster, so perhaps some kind of sensitivity issue?!

Please help if anyone can.

Cheers -- Tim.

views:1572 update:2011/10/8 8:54:25
corona forums © 2003-2011