在android中检测速度 [英] Detect a speed in android

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

问题描述

是否可以在 Android 手机中使用 GPS 或加速度计检测汽车的速度?

is it possible to detect a speed of a car using GPS or accelerometer in android phone ?

谁能给我一份路线图来实现这个?

can anyone give me the road map to implement this ?

推荐答案

是的,可以通过 位置 类.这个类中有 getSpeed() 方法.

Yes, it's possible using GPS via object of Location class. There is getSpeed() method in this class.

很容易找到获取位置的代码.例如,检查此链接.

It's very easy to find code of getting location. Check this link for example.

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

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