Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Accelerometer doesn't work on android 4.1? — Gideros Forum

Accelerometer doesn't work on android 4.1?

pogapoga Member
edited July 2012 in Bugs and issues
Hi,

Anyone tried to run their gideros project on android 4.1?
It seems like I can't get the value of accelerometer on android 4.1.
accelerometer:isAvailable()
returns true, But in this line:
local x, y, z = accelerometer:getAcceleration()
x, y and z are always 0. :(
I tried to set my gideros player to use android 4.1, it still doesn't work.
Everything is fine on iOS and android 4.0

Any idea?

Comments

  • atilimatilim Maintainer
    Did you call accelerometer:start()?
  • pogapoga Member
    yes i did.

    I can reproduce it with only these 4 lines:
    require "accelerometer"
     
    accelerometer:start()
     
    local x, y, z = accelerometer:getAcceleration()
    print(x, y, z)
    --=> 0 0 0
Sign In or Register to comment.