background preloader

Accelerometor - Movement/Motion detaction - shake (Android)

Facebook Twitter

Shake detection

Android shake detection on emulator. SensorSimulator - openintents - Sensor Simulator for simulating sensor data in real time. - Make Android applications work together. The SensorSimulator drives your Android application in real time.

SensorSimulator - openintents - Sensor Simulator for simulating sensor data in real time. - Make Android applications work together.

Download it About the SensorSimulator The OpenIntents SensorSimulator lets you simulate sensor data with the mouse in real time. Moreover, you can simulate your battery level and your gps position too, using a telnet connection. Programming Android Motion Sensors. One of the really neat features of coding for a portable platform like a phone is that you can use its motion sensors to control the UI.

Programming Android Motion Sensors

How useful this is in a particular app varies from "neat gimmick" to "UI perfection" -- admittedly the example here is more on the "gimmick" end of the spectrum, but it'll get you started with using the Android motion sensors. We'll carry on using the code from the previous three tutorials, but this time, we're going to add a detector which enables you to start the timer by shaking the phone. Accelerating... However, all devices should include an accelerometer, and that's what we're going to use here. The regular accelerometer includes a contribution from gravity; so to establish the true acceleration of the device you need to apply a high-pass filter to the values returned (as described in the SensorEvent API docs).