K. Tsang wrote:Hmm interesting. Since I'm not into android dev yet and don't know if it's possible to implement, I probably try to do the following:
Forget about whether the phone is up or tilted or flat. Given you have 3 axis, as long as 2 of these are the same, the third one will be your so-called z axis.
Eg phone is flat: x=0, y=0, z=9
phone is vertical standing up: z=0, y=0, x=9
phone is horizontal standing up: z=0, x=0, y=9
phone is tilted say 45 degree vertical standing up: x=5, y=5, z=9
phone is tilted say 45 degree horizontal standing up: x=5, y=5, z=9
For the exact position on the 3 axis check out SensorManager.getOrientation().
For the exact position on the 3 axis check out SensorManager.getOrientation().
Thanks for reply but i can't understand what you say:( How can i implemented 3 axis? I can implemented 2 axises (x and y that are perpendicular) but i can't implemented z axis. I think if i want to implement 3 axises, i should use 3D show and i don't know this:(
Can you draw your idea (in 45 degree status) in Paint or Photoshope?
Thanks. Cheers