Class ShakePauseController
-
- All Implemented Interfaces:
public final class ShakePauseControllerValidation that tracks significant movements and allows detection to be paused after some time passed since last significant move.
-
-
Field Summary
Fields Modifier and Type Field Description private LongdelayAfterMoveprivate BooleanisEnabled
-
Constructor Summary
Constructors Constructor Description ShakePauseController(Context context)
-
Method Summary
Modifier and Type Method Description final LonggetDelayAfterMove()Delay to wait after significant move. final UnitsetDelayAfterMove(Long delayAfterMove)Delay to wait after significant move. final BooleanisEnabled()final UnitsetEnabled(Boolean isEnabled)final Booleancheck()final UnitonResume()Call to attach to hardware listener. final UnitonPause()Call to detach when component no longer needed. -
-
Constructor Detail
-
ShakePauseController
ShakePauseController(Context context)
- Parameters:
context- needed for attaching to device's hardware for motion detection
-
-
Method Detail
-
getDelayAfterMove
final Long getDelayAfterMove()
Delay to wait after significant move.
-
setDelayAfterMove
final Unit setDelayAfterMove(Long delayAfterMove)
Delay to wait after significant move.
-
setEnabled
final Unit setEnabled(Boolean isEnabled)
-
-
-
-