Is it possible to find whether my device is pointing towards the sky or ahead by the way the user holds it?
I couldn’t find anything in the documentation by which I can know whether this is possible or not.
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yep, it’s possible. What you’re looking for is “orientation sensing.” I found what looks like a good introduction to using orientation sensing here.
Also, here’s the Android documentation.