Package com.appliedrec.verid.core2
Class VerIDFactory
- java.lang.Object
-
- io.reactivex.rxjava3.core.Single<VerID>
-
- com.appliedrec.verid.core2.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 classVerIDFactory.TaskVer-ID creation task
-
Constructor Summary
Constructors Constructor Description VerIDFactory(android.content.Context context)ConstructorVerIDFactory(android.content.Context context, VerIDFactoryDelegate delegate)ConstructorVerIDFactory(android.content.Context context, com.appliedrec.verid.identity.VerIDIdentity identity)ConstructorVerIDFactory(android.content.Context context, com.appliedrec.verid.identity.VerIDIdentity identity, VerIDFactoryDelegate delegate)ConstructorVerIDFactory(android.content.Context context, java.lang.String veridPassword)ConstructorVerIDFactory(android.content.Context context, java.lang.String veridPassword, VerIDFactoryDelegate delegate)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateVerID()Start the creation of an instance of theVer-ID environment.VerIDcreateVerIDSync()Create a Ver-ID instance synchronously.VerIDFactoryDelegategetDelegate()Get the delegate that will be notified of the creation events.IFaceDetectionFactorygetFaceDetectionFactory()Get the factory that will create an instance ofIFaceDetection.IFaceRecognitionFactorygetFaceRecognitionFactory()Get the factory that will create an instance ofIFaceRecognition.java.util.Set<com.appliedrec.verid.core2.livenessdetection.SpoofDetectorModel>getSpoofDetectorModels()IUserManagementFactorygetUserManagementFactory()Get the factory that will create an instance ofIUserManagement.voidsetDelegate(VerIDFactoryDelegate delegate)Set the delegate that will be notified of the creation events.voidsetFaceDetectionFactory(IFaceDetectionFactory faceDetectionFactory)Set the factory that will create an instance ofIFaceDetection.voidsetFaceRecognitionFactory(IFaceRecognitionFactory faceRecognitionFactory)Set the factory that will create an instance ofIFaceRecognition.voidsetIdentity(com.appliedrec.verid.identity.VerIDIdentity identity)Set your app's Ver-ID SDK identityvoidsetSpoofDetectorModels(java.util.Set<com.appliedrec.verid.core2.livenessdetection.SpoofDetectorModel> spoofDetectorModels)voidsetUserManagementFactory(IUserManagementFactory userManagementFactory)Set the factory that will create an instance ofIUserManagement.voidsetVeridPassword(java.lang.String veridPassword)Set Ver-ID passwordprotected voidsubscribeActual(io.reactivex.rxjava3.core.SingleObserver<? super VerID> observer)Implement this method in subclasses to handle the incomingSingleObservers.-
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
-
-
-
-
Constructor Detail
-
VerIDFactory
public VerIDFactory(@NonNull android.content.Context context, @NonNull VerIDFactoryDelegate delegate)Constructor- Parameters:
context- Application contextdelegate- 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, @NonNull VerIDFactoryDelegate delegate)Constructor- Parameters:
context- Application contextveridPassword- Ver-ID password (received after registering your app on the Ver-ID developer website)delegate- Delegate that will be notified of the creation events- Since:
- 1.16.0
- See Also:
VerIDFactory(Context, VerIDIdentity, VerIDFactoryDelegate)
-
VerIDFactory
public VerIDFactory(@NonNull android.content.Context context, @NonNull java.lang.String veridPassword)Constructor- Parameters:
context- Application contextveridPassword- 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 contextidentity- 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 contextidentity- 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.SingleImplement this method in subclasses to handle the incomingSingleObservers.There is no need to call any of the plugin hooks on the current
Singleinstance or theSingleObserver; all hooks and basic safeguards have been applied bySingle.subscribe(SingleObserver)before this method gets called.- Specified by:
subscribeActualin classio.reactivex.rxjava3.core.Single<VerID>- Parameters:
observer- theSingleObserverto handle, notnull
-
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 ofIFaceDetection.- Parameters:
faceDetectionFactory- Face detection factory- Since:
- 1.0.0
-
getFaceDetectionFactory
@NonNull public IFaceDetectionFactory getFaceDetectionFactory()
Get the factory that will create an instance ofIFaceDetection.- Returns:
- Face detection factory
- Since:
- 1.15.0
-
setFaceRecognitionFactory
public void setFaceRecognitionFactory(@NonNull IFaceRecognitionFactory faceRecognitionFactory)Set the factory that will create an instance ofIFaceRecognition.- Parameters:
faceRecognitionFactory- Face recognition factory- Since:
- 1.0.0
-
getFaceRecognitionFactory
@NonNull public IFaceRecognitionFactory getFaceRecognitionFactory()
Get the factory that will create an instance ofIFaceRecognition.- Returns:
- Face recognition factory
- Since:
- 1.15.0
-
setUserManagementFactory
public void setUserManagementFactory(@NonNull IUserManagementFactory userManagementFactory)Set the factory that will create an instance ofIUserManagement.- Parameters:
userManagementFactory- User management factory- Since:
- 1.0.0
-
getUserManagementFactory
@NonNull public IUserManagementFactory getUserManagementFactory()
Get the factory that will create an instance ofIUserManagement.- 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
-
createVerID
public final void createVerID()
Start the creation of an instance of theVer-ID environment.When the environment is created the
delegatewill receive theveridFactoryDidCreateEnvironmentcallback.If the environment creation fails the
delegatewill receive theveridFactoryDidFailWithExceptioncallback.- Since:
- 1.0.0
-
-