Android accelerometer [closed]

2019-05-20 22:33发布

问题:

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.

回答1:

have you tried this one https://github.com/commonsguy/cw-andtutorials/tree/master/38-Sensors ?



回答2:

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.

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



回答3:

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

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