Android的加速计检测的高度? [英] Android accelerometer detect height?

查看:105
本文介绍了Android的加速计检测的高度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用加速度计来检测的高度?例如,提高我的胳膊之后,如果我拿着手机在我手上,然后检测的高度?

Is it possible to use the accelerometer to detect height? For instance, if I'm holding the phone on my hand and then detect the height after raising my arm?

感谢

推荐答案

假设你的意思是你要检测的手机从它的开始点提出的高度,是的。 Android的加速度计测量力,如何使用它的详细信息,可以发现 。请记住,加速度计是不是一个完美的设备,因此您的结果将是多大的电话是真的感动近似。

Assuming you mean you want to detect the height the phone was raised from its staring point, yes. The android accelerometer measures force, more info on how to use it can be found here. Keep in mind that the accelerometer isn't a perfect device, and so your results will be approximations of how much the phone was really moved.

这篇关于Android的加速计检测的高度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆