当GPS不可用时如何得到通知时,手机处于运动? [英] When GPS is not available how to get notified when the phone is in motion?

查看:113
本文介绍了当GPS不可用时如何得到通知时,手机处于运动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想检测的时候,手机是运动的,但不是所有类型的运动。例如拿起或挥动手机不应触发。

I would like to detect when the phone is in motion, but not all kind of motion. For example picking up or waving the phone should not trigger.

我想理想的运行code时,手机/人是>行走状态。我有什么选择?

I would like ideally to run a code when the phone/person is in > "walking" state. What options I have?

推荐答案

您可以使用,在手机,有他们,确定速度和方向的加速度计和数字罗盘的组合。

you can use a combination of the accelerometer and the digital compass, in phones that have them, to determine a speed and direction.

如果你需要做的就是确定这个人是步行,所有你需要的是加速度计。刚处理其输出的脚步。

If all you need to do is determine if the person is walking, all you need is the accelerometer. Just process its output for foot steps.

有很多在网络上的教程用于检测与加速度计脚步。

There are plenty of tutorials on the web for detecting foot steps with an accelerometer.

这篇关于当GPS不可用时如何得到通知时,手机处于运动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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