Class ShakePauseController
-
- All Implemented Interfaces:
public final class ShakePauseController
Validation 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 Long
delayAfterMove
private Boolean
isEnabled
-
Constructor Summary
Constructors Constructor Description ShakePauseController(Context context)
-
Method Summary
Modifier and Type Method Description final Long
getDelayAfterMove()
Delay to wait after significant move. final Unit
setDelayAfterMove(Long delayAfterMove)
Delay to wait after significant move. final Boolean
isEnabled()
final Unit
setEnabled(Boolean isEnabled)
final Boolean
check()
final Unit
onResume()
Call to attach to hardware listener. final Unit
onPause()
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)
-
-
-
-