Class VerIDFactory

  • All Implemented Interfaces:
    io.reactivex.rxjava3.core.SingleSource<VerID>

    public class VerIDFactory
    extends io.reactivex.rxjava3.core.Single<VerID>
    Ver-ID environment factory
    Since:
    1.0.0

    Example of usage with delegate

     VerIDFactory veridFactory = new VerIDFactory(context);
     veridFactory.setDelegate(new VerIDFactoryDelegate() {
    
         @Override
         public void onVerIDCreated(VerIDFactory factory, VerID environment) {
             // Ver-ID loaded
         }
    
         @Override
         public void onVerIDCreationFailed(VerIDFactory factory, Exception error) {
             // Ver-ID loading failed
         }
     });
     veridFactory.createVerID();
     

    Reactive usage example (introduced in 2.0.0)

     
     VerIDFactory veridFactory = new VerIDFactory(context);
     Disposable veridFactoryDisposable = veridFactory.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(
         verid -> {
             // Ver-ID loaded
         },
         error -> {
             // Ver-ID loading failed
         }
     );
     
     
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  VerIDFactory.Task
      Ver-ID creation task
    • Constructor Summary

      Constructors 
      Constructor Description
      VerIDFactory​(android.content.Context context)
      Constructor
      VerIDFactory​(android.content.Context context, VerIDFactoryDelegate delegate)
      Constructor
      VerIDFactory​(android.content.Context context, com.appliedrec.verid.identity.VerIDIdentity identity)
      Constructor
      VerIDFactory​(android.content.Context context, com.appliedrec.verid.identity.VerIDIdentity identity, VerIDFactoryDelegate delegate)
      Constructor
      VerIDFactory​(android.content.Context context, java.lang.String veridPassword)
      Constructor
      VerIDFactory​(android.content.Context context, java.lang.String veridPassword, VerIDFactoryDelegate delegate)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void createVerID()
      Start the creation of an instance of the Ver-ID environment.
      VerID createVerIDSync()
      Create a Ver-ID instance synchronously.
      VerIDFactoryDelegate getDelegate()
      Get the delegate that will be notified of the creation events.
      IFaceDetectionFactory getFaceDetectionFactory()
      Get the factory that will create an instance of IFaceDetection.
      IFaceRecognitionFactory getFaceRecognitionFactory()
      Get the factory that will create an instance of IFaceRecognition.
      java.util.Set<com.appliedrec.verid.core2.livenessdetection.SpoofDetectorModel> getSpoofDetectorModels()  
      IUserManagementFactory getUserManagementFactory()
      Get the factory that will create an instance of IUserManagement.
      void setDelegate​(VerIDFactoryDelegate delegate)
      Set the delegate that will be notified of the creation events.
      void setFaceDetectionFactory​(IFaceDetectionFactory faceDetectionFactory)
      Set the factory that will create an instance of IFaceDetection.
      void setFaceRecognitionFactory​(IFaceRecognitionFactory faceRecognitionFactory)
      Set the factory that will create an instance of IFaceRecognition.
      void setIdentity​(com.appliedrec.verid.identity.VerIDIdentity identity)
      Set your app's Ver-ID SDK identity
      void setSpoofDetectorModels​(java.util.Set<com.appliedrec.verid.core2.livenessdetection.SpoofDetectorModel> spoofDetectorModels)  
      void setUserManagementFactory​(IUserManagementFactory userManagementFactory)
      Set the factory that will create an instance of IUserManagement.
      void setVeridPassword​(java.lang.String veridPassword)
      Set Ver-ID password
      protected void subscribeActual​(io.reactivex.rxjava3.core.SingleObserver<? super VerID> observer)
      Implement this method in subclasses to handle the incoming SingleObservers.
      • Methods inherited from class io.reactivex.rxjava3.core.Single

        amb, ambArray, ambWith, blockingGet, blockingSubscribe, blockingSubscribe, blockingSubscribe, blockingSubscribe, cache, cast, compose, concat, concat, concat, concat, concat, concat, concat, concatArray, concatArrayDelayError, concatArrayEager, concatArrayEagerDelayError, concatDelayError, concatDelayError, concatDelayError, concatEager, concatEager, concatEager, concatEager, concatEagerDelayError, concatEagerDelayError, concatEagerDelayError, concatEagerDelayError, concatMap, concatMapCompletable, concatMapMaybe, concatWith, contains, contains, create, defer, delay, delay, delay, delay, delaySubscription, delaySubscription, delaySubscription, delaySubscription, delaySubscription, delaySubscription, dematerialize, doAfterSuccess, doAfterTerminate, doFinally, doOnDispose, doOnError, doOnEvent, doOnLifecycle, doOnSubscribe, doOnSuccess, doOnTerminate, error, error, filter, flatMap, flatMap, flatMap, flatMapCompletable, flatMapMaybe, flatMapObservable, flatMapPublisher, flattenAsFlowable, flattenAsObservable, flattenStreamAsFlowable, flattenStreamAsObservable, fromCallable, fromCompletionStage, fromFuture, fromFuture, fromMaybe, fromMaybe, fromObservable, fromPublisher, fromSupplier, hide, ignoreElement, just, lift, map, mapOptional, materialize, merge, merge, merge, merge, merge, merge, mergeArray, mergeArrayDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeWith, never, observeOn, ofType, onErrorComplete, onErrorComplete, onErrorResumeNext, onErrorResumeWith, onErrorReturn, onErrorReturnItem, onTerminateDetach, repeat, repeat, repeatUntil, repeatWhen, retry, retry, retry, retry, retry, retryUntil, retryWhen, safeSubscribe, sequenceEqual, startWith, startWith, startWith, startWith, startWith, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribeOn, subscribeWith, switchOnNext, switchOnNextDelayError, takeUntil, takeUntil, takeUntil, test, test, timeInterval, timeInterval, timeInterval, timeInterval, timeout, timeout, timeout, timeout, timer, timer, timestamp, timestamp, timestamp, timestamp, to, toCompletionStage, toFlowable, toFuture, toMaybe, toObservable, unsafeCreate, unsubscribeOn, using, using, wrap, zip, zip, zip, zip, zip, zip, zip, zip, zip, zipArray, zipWith
      • Methods inherited from class java.lang.Object

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

      • VerIDFactory

        public VerIDFactory​(@NonNull
                            android.content.Context context,
                            @NonNull
                            VerIDFactoryDelegate delegate)
        Constructor
        Parameters:
        context - Application context
        delegate - Delegate that will be notified of the creation events
        Since:
        1.0.0
      • VerIDFactory

        public VerIDFactory​(@NonNull
                            android.content.Context context,
                            @NonNull
                            java.lang.String veridPassword)
        Constructor
        Parameters:
        context - Application context
        veridPassword - Ver-ID password (received after registering your app on the Ver-ID developer website)
        Since:
        1.16.0
        See Also:
        VerIDFactory(Context, VerIDIdentity)
      • VerIDFactory

        public VerIDFactory​(@NonNull
                            android.content.Context context,
                            @NonNull
                            com.appliedrec.verid.identity.VerIDIdentity identity,
                            @NonNull
                            VerIDFactoryDelegate delegate)
        Constructor
        Parameters:
        context - Application context
        identity - Your app's Ver-ID SDK identity (created from credentials received after registering your app on the Ver-ID developer website)
        delegate - Delegate that will be notified of the creation events
        Since:
        1.19.0
      • VerIDFactory

        public VerIDFactory​(@NonNull
                            android.content.Context context,
                            @NonNull
                            com.appliedrec.verid.identity.VerIDIdentity identity)
        Constructor
        Parameters:
        context - Application context
        identity - Your app's Ver-ID SDK identity (created from credentials received after registering your app on the Ver-ID developer website)
        Since:
        1.19.0
      • VerIDFactory

        public VerIDFactory​(@NonNull
                            android.content.Context context)
        Constructor
        Parameters:
        context - Application context
        Since:
        1.16.0
    • Method Detail

      • subscribeActual

        protected void subscribeActual​(io.reactivex.rxjava3.core.SingleObserver<? super VerID> observer)
        Description copied from class: io.reactivex.rxjava3.core.Single
        Implement this method in subclasses to handle the incoming SingleObservers.

        There is no need to call any of the plugin hooks on the current Single instance or the SingleObserver; all hooks and basic safeguards have been applied by Single.subscribe(SingleObserver) before this method gets called.

        Specified by:
        subscribeActual in class io.reactivex.rxjava3.core.Single<VerID>
        Parameters:
        observer - the SingleObserver to handle, not null
      • setVeridPassword

        public void setVeridPassword​(@NonNull
                                     java.lang.String veridPassword)
        Set Ver-ID password
        Parameters:
        veridPassword - Ver-ID password received after registering your app on the Ver-ID developer website
        Since:
        1.16.0
      • setIdentity

        public void setIdentity​(@NonNull
                                com.appliedrec.verid.identity.VerIDIdentity identity)
        Set your app's Ver-ID SDK identity
        Parameters:
        identity - Identity created from credentials received after registering your app on the Ver-ID developer website
        Since:
        1.19.0
      • setFaceDetectionFactory

        public void setFaceDetectionFactory​(@NonNull
                                            IFaceDetectionFactory faceDetectionFactory)
        Set the factory that will create an instance of IFaceDetection.
        Parameters:
        faceDetectionFactory - Face detection factory
        Since:
        1.0.0
      • getFaceDetectionFactory

        @NonNull
        public IFaceDetectionFactory getFaceDetectionFactory()
        Get the factory that will create an instance of IFaceDetection.
        Returns:
        Face detection factory
        Since:
        1.15.0
      • setFaceRecognitionFactory

        public void setFaceRecognitionFactory​(@NonNull
                                              IFaceRecognitionFactory faceRecognitionFactory)
        Set the factory that will create an instance of IFaceRecognition.
        Parameters:
        faceRecognitionFactory - Face recognition factory
        Since:
        1.0.0
      • getFaceRecognitionFactory

        @NonNull
        public IFaceRecognitionFactory getFaceRecognitionFactory()
        Get the factory that will create an instance of IFaceRecognition.
        Returns:
        Face recognition factory
        Since:
        1.15.0
      • setUserManagementFactory

        public void setUserManagementFactory​(@NonNull
                                             IUserManagementFactory userManagementFactory)
        Set the factory that will create an instance of IUserManagement.
        Parameters:
        userManagementFactory - User management factory
        Since:
        1.0.0
      • getUserManagementFactory

        @NonNull
        public IUserManagementFactory getUserManagementFactory()
        Get the factory that will create an instance of IUserManagement.
        Returns:
        User management factory
        Since:
        1.15.0
      • setDelegate

        public void setDelegate​(@Nullable
                                VerIDFactoryDelegate delegate)
        Set the delegate that will be notified of the creation events.
        Parameters:
        delegate - Delegate
        Since:
        1.0.0
      • getDelegate

        @Nullable
        public VerIDFactoryDelegate getDelegate()
        Get the delegate that will be notified of the creation events.
        Returns:
        Delegate
        Since:
        1.0.0
      • getSpoofDetectorModels

        public java.util.Set<com.appliedrec.verid.core2.livenessdetection.SpoofDetectorModel> getSpoofDetectorModels()
        Returns:
        Spoof detector models to use for passive liveness detection
        Since:
        2.9.0
      • setSpoofDetectorModels

        public void setSpoofDetectorModels​(java.util.Set<com.appliedrec.verid.core2.livenessdetection.SpoofDetectorModel> spoofDetectorModels)
        Parameters:
        spoofDetectorModels - Spoof detector models to use for passive liveness detection
        Since:
        2.9.0
      • createVerIDSync

        @WorkerThread
        @NonNull
        public final VerID createVerIDSync()
                                    throws java.lang.Exception
        Create a Ver-ID instance synchronously. This method must be called on a background thread.
        Returns:
        Instance of VerID
        Throws:
        java.lang.Exception - If the instance creation fails
        Since:
        1.13.0