public class Sensey
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static Sensey |
getInstance()
Gets instance.
|
void |
init(android.content.Context context)
Init.
|
void |
setupDispatchTouchEvent(android.view.MotionEvent event)
Sets dispatch touch event.
|
void |
startFlipDetection(FlipDetector.FlipListener flipListener)
Start flip detection.
|
void |
startLightDetection(int threshold,
LightDetector.LightListener lightListener)
Start light detection.
|
void |
startLightDetection(LightDetector.LightListener lightListener)
Start light detection.
|
void |
startOrientationDetection(int smoothness,
OrientationDetector.OrientationListener orientationListener)
Start orientation detection.
|
void |
startOrientationDetection(OrientationDetector.OrientationListener orientationListener)
Start orientation detection.
|
void |
startPinchScaleDetection(PinchScaleDetector.PinchScaleListener pinchScaleListener)
Start pinch scale detection.
|
void |
startProximityDetection(float threshold,
ProximityDetector.ProximityListener proximityListener)
Start proximity detection.
|
void |
startProximityDetection(ProximityDetector.ProximityListener proximityListener)
Start proximity detection.
|
void |
startSensorDetection(com.github.nisrulz.sensey.SensorDetector detector)
Start sensor detection.
|
void |
startShakeDetection(int threshold,
ShakeDetector.ShakeListener shakeListener)
Start shake detection.
|
void |
startShakeDetection(ShakeDetector.ShakeListener shakeListener)
Start shake detection.
|
void |
startTouchTypeDetection(TouchTypeDetector.TouchTypListener touchTypListener)
Start touch type detection.
|
void |
startWaveDetection(float threshold,
WaveDetector.WaveListener waveListener)
Start proximity detection.
|
void |
startWaveDetection(WaveDetector.WaveListener waveListener)
Start proximity detection.
|
void |
stopFlipDetection(FlipDetector.FlipListener flipListener)
Stop flip detection.
|
void |
stopLightDetection(LightDetector.LightListener lightListener)
Stop light detection.
|
void |
stopOrientationDetection(OrientationDetector.OrientationListener orientationListener)
Stop orientation detection.
|
void |
stopPinchScaleDetection()
Stop pinch scale detection.
|
void |
stopProximityDetection(ProximityDetector.ProximityListener proximityListener)
Stop proximity detection.
|
void |
stopSensorDetection(com.github.nisrulz.sensey.SensorDetector detector)
Stop sensor detection.
|
void |
stopShakeDetection(ShakeDetector.ShakeListener shakeListener)
Stop shake detection.
|
void |
stopTouchTypeDetection()
Stop touch type detection.
|
void |
stopWaveDetection(WaveDetector.WaveListener waveListener)
Stop proximity detection.
|
public static Sensey getInstance()
public void init(android.content.Context context)
context - the contextpublic void startSensorDetection(com.github.nisrulz.sensey.SensorDetector detector)
detector - the detectorpublic void stopSensorDetection(com.github.nisrulz.sensey.SensorDetector detector)
detector - the detectorpublic void startShakeDetection(ShakeDetector.ShakeListener shakeListener)
shakeListener - the shake listenerpublic void startShakeDetection(int threshold,
ShakeDetector.ShakeListener shakeListener)
threshold - the thresholdshakeListener - the shake listenerpublic void stopShakeDetection(ShakeDetector.ShakeListener shakeListener)
shakeListener - the shake listenerpublic void startLightDetection(LightDetector.LightListener lightListener)
lightListener - the light listenerpublic void startLightDetection(int threshold,
LightDetector.LightListener lightListener)
threshold - the thresholdlightListener - the light listenerpublic void stopLightDetection(LightDetector.LightListener lightListener)
lightListener - the light listenerpublic void startFlipDetection(FlipDetector.FlipListener flipListener)
flipListener - the flip listenerpublic void stopFlipDetection(FlipDetector.FlipListener flipListener)
flipListener - the flip listenerpublic void startOrientationDetection(OrientationDetector.OrientationListener orientationListener)
orientationListener - the orientation listenerpublic void startOrientationDetection(int smoothness,
OrientationDetector.OrientationListener orientationListener)
smoothness - the smoothnessorientationListener - the orientation listenerpublic void stopOrientationDetection(OrientationDetector.OrientationListener orientationListener)
orientationListener - the orientation listenerpublic void startProximityDetection(ProximityDetector.ProximityListener proximityListener)
proximityListener - the proximity listenerpublic void startProximityDetection(float threshold,
ProximityDetector.ProximityListener proximityListener)
threshold - the thresholdproximityListener - the proximity listenerpublic void stopProximityDetection(ProximityDetector.ProximityListener proximityListener)
proximityListener - the proximity listenerpublic void startWaveDetection(WaveDetector.WaveListener waveListener)
waveListener - the wave listenerpublic void startWaveDetection(float threshold,
WaveDetector.WaveListener waveListener)
threshold - the thresholdwaveListener - the wave listenerpublic void stopWaveDetection(WaveDetector.WaveListener waveListener)
waveListener - the wave listenerpublic void startPinchScaleDetection(PinchScaleDetector.PinchScaleListener pinchScaleListener)
pinchScaleListener - the pinch scale listenerpublic void stopPinchScaleDetection()
public void startTouchTypeDetection(TouchTypeDetector.TouchTypListener touchTypListener)
touchTypListener - the touch typ listenerpublic void stopTouchTypeDetection()
public void setupDispatchTouchEvent(android.view.MotionEvent event)
event - the event