Class ShakeAutoSnappingPredicate

  • All Implemented Interfaces:
    io.scanbot.sdk.camera.autosnapping.IAutoSnappingPredicate

    
    public final class ShakeAutoSnappingPredicate
     implements IAutoSnappingPredicate<Unit>
                        

    Validation that tracks significant movements and allows snap only after some time passed since last significant move.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Boolean isEnabled
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Boolean isEnabled()
      final Unit setEnabled(Boolean isEnabled)
      Boolean checkState(Unit param) Run this check.
      final Unit onResume() Call to attach to hardware listener.
      final Unit onPause() Call to detach when component no longer needed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ShakeAutoSnappingPredicate

        ShakeAutoSnappingPredicate(Context context, Function0<Unit> moveCallback)
        Parameters:
        context - needed for attaching to device's hardware for motion detection
        moveCallback - here can reside some additional logic to perform when move detected