-5

I am making an app where I would need an "tilt" action or how should I say it. The best way to explain what I need would be to look at Ellen DeGeneres app HeadsUp! In the game if you tilt you phone up it passes the word and if you tilt phone down it is correct. Hope you undestand what I need. I really don't know how to do that, tried everything but did not succeed. Sorry for my poor english :)

http://www.youtube.com/watch?v=xDpKOiciUBU#t=20

So, does anyone have an idea how to do that? Thanks in advance :)

Fisheroid
  • 33
  • 10

1 Answers1

1

You probably need to look at how to use the motion sensors in Android, particularly the rotation sensor. How accurate you want it to be depends on how many axes you are willing to consider and how good you are at math.

A detailed answer can be found here: How to detect left and right tilt of an android device mounted with an accelerometer?

Community
  • 1
  • 1
An SO User
  • 24,612
  • 35
  • 133
  • 221