安卓accelometer检测跳? [英] android accelometer detect jumping?

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

问题描述

您好!

我刚开始学习Android开发,我想知道是否有任何内置的机械的Andr​​oid手机,能够检测,如果一个人蹲(如果一个人认为他的手机拿在手里,并保持他的手稳定,手机改变了它的海拔高度约1米)或者跳跃。用户拿着他的手机在他的手在这两种情况下。如果有,应该一看什么样的包到使用这些内置的探测器?

I'm just starting out with Android development and i was wondering if there is any built in machinery in Android phones that are able to detect if a person is squatting (if a person holds his phone in his hand and keeps his hand steady, the phone changes it's altitude by approximately 1 m) or jumping. The user is holding his phone in his hand in both cases. If there is, what kind of packages should one look into to use those built in detectors?

非常感谢您的帮助!

推荐答案

在这两种情况下,你会想利用内置的加速度计。蹲将很难可靠地检测虽然。跳可能是相当容易的。例如,跳跃时,将有一个向上的加速度显著大于重力,接着自由落体,紧接着又向上的加速度向上。 (着陆)。

In both cases you'll want to make use of the inbuilt accelerometer. Squatting will be very difficult to detect reliably though. Jumping could be quite easy. For example, when jumping, there will be an upward acceleration significantly greater than gravity, followed by free-fall, followed by another upward acceleration upwards. (Landing).

这篇关于安卓accelometer检测跳?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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