Nook Color and the Accelerometer

Has anyone had any luck getting the accelerometer working reliably on the Nook Color?

It wasn’t working in my app so I built the Ansca Accelerometer1 demo and pushed it to the Nook Color. I get accelerometer values for about a second and then nothing. Then after about 20 seconds I may get one more reading… then nothing.

Thanks,
Mark

(Sorry if this post shows up multiple time. I posted it and it never showed up on the forums) [import]uid: 117098 topic_id: 25142 reply_id: 325142[/import]

Does anyone have a Nook Color that could try installing the Accelerometer1 Corona demo and see if it works for you. Do you get the same results I got above?

Thanks,
Mark [import]uid: 117098 topic_id: 25142 reply_id: 102744[/import]

Hello Mark,

There is a known bug where accelerometer data is received for a few seconds and then readings completely stop coming in. This issue only appears to happen on Nook. I imagine this is the same issue that you are running into, correct?

There is currently no known work-around for this issue. We plan on addressing this issue by the next release of the Corona SDK, but no ETA just yet. I recommend that you do not use the accelerometer feature until this issue is addressed. We’ll make sure to notify you when this issue is fixed.

Sorry about the inconvenience. [import]uid: 32256 topic_id: 25142 reply_id: 102932[/import]

Hi Josha. It sounds like the Nook is worse than the Kindle Fire then. That is sad news. I wanted to release Omniblaster for those two markets in particular the Nook because it’s a good paying market. [import]uid: 19626 topic_id: 25142 reply_id: 102949[/import]

Yes, it is worse on the Nook. There is clearly something wrong on the Nook side. I remember doing a quick investigation on this issue a few months ago and the accelerometer readings simply stop being sent to our Java code by the Android OS. It’s really bizarre because no other Android device behaves like this. It’s like the device’s sensor or its driver craps out and refuses to work ever again.

Luckily we have a good relationship with Barnes&Noble’s tech-support group, so I’m sure we can work something out. It just won’t be a quick easy fix. [import]uid: 32256 topic_id: 25142 reply_id: 102954[/import]

Thanks. I guess I’ll either have to wait before releasing on Nook or have the game work by touch on the Nook and accelerometer on iOS.

Mark [import]uid: 117098 topic_id: 25142 reply_id: 102960[/import]

Do you guys know if this bug occurs on the Nook Tablet as well or is it only on the Color? I only have a Color so I can’t test on the tablet to tell, if so then I can include tilt control if the user is running a Tablet. Thanks! [import]uid: 111561 topic_id: 25142 reply_id: 105216[/import]

I haven’t tried it on a Nook Tablet yet, but we do have that device in the office and will test on it when it comes time to address this issue. [import]uid: 32256 topic_id: 25142 reply_id: 105327[/import]

Everyone,

We’ve confirmed that the accelerometer works correctly on Nook Tablet. So, this is only an issue on Nook Color… which is still on our priority list to resolve. [import]uid: 32256 topic_id: 25142 reply_id: 107540[/import]

Thanks for the update, Joshua.

Mark [import]uid: 117098 topic_id: 25142 reply_id: 107575[/import]

Here is an update…

We’re looking into fixing the Nook Color accelerometer issue now. We’ve found a solution for the Nook Color. However, we’re trying to address the Kindle Fire accelerometer issue that Rob mentioned as well. It turns out that the Kindle Fire’s accelerometer has a very different behavior compared to other Android devices that we’ve tested with. The Kindle Fire only provides sensor readings when the device is moved (ie: when accelerometer values change) versus other Android devices provide measurements at the given sample interval set via the [lua]system.setAccelerometerInterval()[/lua]. We’re looking into addressing resolving ALL accelerometer issues this week, so stay tuned! [import]uid: 32256 topic_id: 25142 reply_id: 108345[/import]

Kind of a funny story about that…

I went ahead and sent OmniBlaster to Amazon so they could start selling it to regular Android peeps… I put a BIG FAT NOTE in the developer notes saying: “DO NOT release for the Kindle Fire, It doesn’t work on that device yet”. Today I got a note saying that it failed Kindle Fire certification because the accelerometer didn’t work.

*FACEPALM* Can’t they read?

Anyway, I’m tickled about this post. Perhaps I can get the tilt-version of OmniBlaster up in those two market places and earn something for the hard work I (and my artist) put into the game.

[import]uid: 19626 topic_id: 25142 reply_id: 108423[/import]

Yeah, sorry about the trouble there Rob. App reviewers are pretty much like robots. They just follow procedures. This is not the first time I’ve heard of them ignoring a developer’s notes. The only way to prevent your app from being tested on a Kindle Fire is to set up your app’s AndroidManifest.xml file to require a feature that the Kindle Fire does not have, such as the “android.hardware.telephony” feature. Although that would prevent your app from being purchasable on other Android tablets as well and isn’t a good solution. [import]uid: 32256 topic_id: 25142 reply_id: 108519[/import]

Hey Joshua, do you guys have any update on the accelerometer fix yet, or is it already fixed? I haven’t been keeping up with the daily builds updates for the last week or 2, so I haven’t been able to see if there was a fix for this yet.

Thanks!
Richards App Store [import]uid: 111561 topic_id: 25142 reply_id: 109152[/import]

No fix yet. It is taking longer than I thought and involves rewriting whole sections of code. I apologize for the delay. We hope to have a fix available this week. [import]uid: 32256 topic_id: 25142 reply_id: 109265[/import]

Everyone,

This accelerometer issue is now fixed. It now works correctly on Nook Color. We also improved the responsiveness of the sensor readings and you should see a huge improvement on Kindle Fire.

This fix will be made available in daily build #828.

A bit of advise. On Android, measurements will not be received by your Lua listener until just before your enterFrame event occurs. That is, received measurements are constrained by the FPS of your app. For example, if you set up the accelerometer frequency to 100 Hz (ie: 10 millisecond intervals) and your app is set up for 30 FPS (ie: renders every 33.3 milliseconds) then your accelerometer Lua listener will by called roughly 3 times in one shot for every render pass. Now, the sensor readings will be taken at the correct intervals, but they will be queued up and sent to your Lua listener in bulk at the start of the next render pass. The extra measurements per render pass might not be that useful to you.

So, I recommend that you set the accelerometer interval to match the frame rate of your app. That is, set the frequency to 30 if your frame rate is 30. Set the frequency to 60 if your frame rate is 60… which is best for games. A frequency of 100 may be complete overkill for your app since it will take measurements faster than your app can render… and it will also peg the CPU and kill battery life on the device. Just my advise.

Anyways, have at it guys… and sorry about the delay. I ended up completely rewriting the sensor management code on Android to get it where we all need it to be. [import]uid: 32256 topic_id: 25142 reply_id: 109574[/import]

This is awesome news, thanks so much Joshua for the quick fix, I was expecting this wouldn’t be worked on for a couple months. I’ve been waiting for this feature to finish the work on my newest game, and now I can finish it!

Thanks again!
Richards App Store [import]uid: 111561 topic_id: 25142 reply_id: 109577[/import]

And there was much rejoicing!!!
OmniBlaster will be submitted to Nook and resubmitted to Amazon.
Thank you… Thank you… Thank you… [import]uid: 19626 topic_id: 25142 reply_id: 109581[/import]

Thanks for the update Josh! Great news.

Mark [import]uid: 117098 topic_id: 25142 reply_id: 109829[/import]

Hi everyone,

Happy to help! I assume that you all tested the newest daily build with your apps and the accelerometer problems are gone now, right? Just want to confirm. Thanks! [import]uid: 32256 topic_id: 25142 reply_id: 110160[/import]