java 安卓加速度计

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4456088/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 06:28:10  来源:igfitidea点击:

Android accelerometer

javaandroidaccelerometer

提问by semajhan

Is it just me or can I not find a simple tutorial on accessing the accelerometer in android via google search? Every other time I search for some simple tutorial(countdowntimers, activities, handlers, threads) I can find some but for some reason the accelerometer subject is vague. I use the examples from the sdk as a second or 3rd source once I get a clearer understanding from a simpler(as in for beginners) source, which are the sample tutorials other's provide on their blogs/site. Where can I get a simple accelerometer tutorial? Two books that I own don't have anything on the matter either.

是我一个人还是我找不到有关通过谷歌搜索在 android 中访问加速度计的简单教程?每隔一段时间我搜索一些简单的教程(倒计时、活动、处理程序、线程)时,我都会找到一些,但由于某种原因,加速度计主题含糊不清。一旦我从更简单的(对于初学者而言)源中获得了更清晰的理解,我就会使用 sdk 中的示例作为第二个或第三个源,这些源是其他人在他们的博客/站点上提供的示例教程。我在哪里可以获得简单的加速度计教程?我拥有的两本书也没有关于此事的任何内容。

回答by Jon Willis

This is a very helpful bit of documentation from the android API reference, note especially the low-pass filter which can be very useful for smoothing out jitter.

这是来自 android API 参考的一个非常有用的文档,特别注意低通滤波器,它对于平滑抖动非常有用。

http://developer.android.com/reference/android/hardware/SensorEvent.html#values

http://developer.android.com/reference/android/hardware/SensorEvent.html#values

回答by uttara_shekar

Professional Android Sensor Programmingby Milette is a good book for Android sensor programming.

Milette 的Professional Android Sensor Programming是一本关于 Android 传感器编程的好书。

If you don't want to buy it, you can always Google for an ebook.

如果您不想购买,可以随时在 Google 上搜索电子书。