public class ShakeDetector
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ShakeDetector.OnShakeListener
This interface defines a listener on the main interface
to listen for the activity of shaking.
|
| Constructor and Description |
|---|
ShakeDetector() |
| Modifier and Type | Method and Description |
|---|---|
void |
onAccuracyChanged(Sensor sensor,
int accuracy) |
void |
onSensorChanged(SensorEvent event) |
void |
setOnShakeListener(ShakeDetector.OnShakeListener listener)
Adds a listener listening for the activity of shaking to the detector.
|
public void setOnShakeListener(ShakeDetector.OnShakeListener listener)
listener - a listener listening for the activity of shakingpublic void onSensorChanged(SensorEvent event)
public void onAccuracyChanged(Sensor sensor,
int accuracy)