Package com.appliedrec.verid.ui2
Class VerIDSession
- java.lang.Object
- 
- com.appliedrec.verid.ui2.VerIDSession
 
- 
- All Implemented Interfaces:
- android.app.Application.ActivityLifecycleCallbacks,- androidx.test.espresso.IdlingResource,- IVerIDSession<VerIDSessionDelegate>
 
 public class VerIDSession extends java.lang.Object implements IVerIDSession<VerIDSessionDelegate>, android.app.Application.ActivityLifecycleCallbacks, androidx.test.espresso.IdlingResource Ver-ID session class- Since:
- 2.0.0
 
- 
- 
Constructor SummaryConstructors Constructor Description VerIDSession(VerID verID, VerIDSessionSettings settings)Session constructorVerIDSession(VerID verID, VerIDSessionSettings settings, IStringTranslator stringTranslator)Session constructor
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<VerIDSessionDelegate>getDelegate()Get session delegatejava.lang.StringgetName()Returns the name of the resources (used for logging and idempotency of registration).longgetSessionIdentifier()Session identifier – can be used to distinguish between different session instancesVerIDSessionSettingsgetSettings()VerIDgetVerID()protected java.util.Optional<ISessionVideoRecorder>getVideoRecorder()booleanisIdleNow()Returnstrueif resource is currently idle.voidonActivityCreated(android.app.Activity activity, android.os.Bundle bundle)Called when the Activity callssuper.onCreate().voidonActivityDestroyed(android.app.Activity activity)Called when the Activity callssuper.onDestroy().voidonActivityPaused(android.app.Activity activity)Called when the Activity callssuper.onPause().voidonActivityResumed(android.app.Activity activity)Called when the Activity callssuper.onResume().voidonActivitySaveInstanceState(android.app.Activity activity, android.os.Bundle outState)Called when the Activity callssuper.onSaveInstanceState().voidonActivityStarted(android.app.Activity activity)Called when the Activity callssuper.onStart().voidonActivityStopped(android.app.Activity activity)Called when the Activity callssuper.onStop().voidregisterIdleTransitionCallback(androidx.test.espresso.IdlingResource.ResourceCallback callback)Registers the givenIdlingResource.ResourceCallbackwith the resource.voidsetDelegate(VerIDSessionDelegate delegate)Set session delegatevoidstart()Start the session- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface android.app.Application.ActivityLifecycleCallbacksonActivityConfigurationChanged, onActivityPostCreated, onActivityPostDestroyed, onActivityPostPaused, onActivityPostResumed, onActivityPostSaveInstanceState, onActivityPostStarted, onActivityPostStopped, onActivityPreCreated, onActivityPreDestroyed, onActivityPrePaused, onActivityPreResumed, onActivityPreSaveInstanceState, onActivityPreStarted, onActivityPreStopped
 
- 
 
- 
- 
- 
Constructor Detail- 
VerIDSessionpublic VerIDSession(@NonNull VerID verID, @NonNull VerIDSessionSettings settings)Session constructor- Parameters:
- verID- Instance of VerID to use for face detection, recognition and user management
- settings- Session settings
- Since:
- 2.0.0
 
 - 
VerIDSessionpublic VerIDSession(@NonNull VerID verID, @NonNull VerIDSessionSettings settings, @NonNull IStringTranslator stringTranslator)Session constructor- Parameters:
- verID- Instance of VerID to use for face detection, recognition and user management
- settings- Session settings
- stringTranslator- Translator for strings used in the session
- Since:
- 2.0.0
 
 
- 
 - 
Method Detail- 
startpublic void start() Start the session- Specified by:
- startin interface- IVerIDSession<VerIDSessionDelegate>
- Since:
- 2.0.0
 
 - 
getSessionIdentifierpublic long getSessionIdentifier() Session identifier – can be used to distinguish between different session instances- Specified by:
- getSessionIdentifierin interface- IVerIDSession<VerIDSessionDelegate>
- Returns:
- Identifier for the session
- Since:
- 2.0.0
 
 - 
getVerID@NonNull public VerID getVerID() - Specified by:
- getVerIDin interface- IVerIDSession<VerIDSessionDelegate>
- Returns:
- Instance of VerID being used by the session for face detection, recognition and user management
- Since:
- 2.0.0
 
 - 
getSettings@NonNull public VerIDSessionSettings getSettings() - Specified by:
- getSettingsin interface- IVerIDSession<VerIDSessionDelegate>
- Returns:
- Session settings
- Since:
- 2.0.0
 
 - 
getDelegate@NonNull public java.util.Optional<VerIDSessionDelegate> getDelegate() Get session delegate- Specified by:
- getDelegatein interface- IVerIDSession<VerIDSessionDelegate>
- Returns:
- Optional holding the session delegate or empty optional if delegate not set
- Since:
- 2.0.0
 
 - 
setDelegatepublic void setDelegate(@Nullable VerIDSessionDelegate delegate)Set session delegate- Specified by:
- setDelegatein interface- IVerIDSession<VerIDSessionDelegate>
- Parameters:
- delegate- Session delegate
- Since:
- 2.0.0
 
 - 
getVideoRecorderprotected java.util.Optional<ISessionVideoRecorder> getVideoRecorder() 
 - 
onActivityCreated@RestrictTo(LIBRARY_GROUP) public void onActivityCreated(@NonNull android.app.Activity activity, @Nullable android.os.Bundle bundle)Description copied from interface:android.app.Application.ActivityLifecycleCallbacksCalled when the Activity callssuper.onCreate().- Specified by:
- onActivityCreatedin interface- android.app.Application.ActivityLifecycleCallbacks
 
 - 
onActivityDestroyed@RestrictTo(LIBRARY_GROUP) public void onActivityDestroyed(@NonNull android.app.Activity activity)Description copied from interface:android.app.Application.ActivityLifecycleCallbacksCalled when the Activity callssuper.onDestroy().- Specified by:
- onActivityDestroyedin interface- android.app.Application.ActivityLifecycleCallbacks
 
 - 
onActivityStarted@RestrictTo(LIBRARY_GROUP) public void onActivityStarted(@NonNull android.app.Activity activity)Description copied from interface:android.app.Application.ActivityLifecycleCallbacksCalled when the Activity callssuper.onStart().- Specified by:
- onActivityStartedin interface- android.app.Application.ActivityLifecycleCallbacks
 
 - 
onActivityResumed@RestrictTo(LIBRARY_GROUP) public void onActivityResumed(@NonNull android.app.Activity activity)Description copied from interface:android.app.Application.ActivityLifecycleCallbacksCalled when the Activity callssuper.onResume().- Specified by:
- onActivityResumedin interface- android.app.Application.ActivityLifecycleCallbacks
 
 - 
onActivityPaused@RestrictTo(LIBRARY_GROUP) public void onActivityPaused(@NonNull android.app.Activity activity)Description copied from interface:android.app.Application.ActivityLifecycleCallbacksCalled when the Activity callssuper.onPause().- Specified by:
- onActivityPausedin interface- android.app.Application.ActivityLifecycleCallbacks
 
 - 
onActivityStopped@RestrictTo(LIBRARY_GROUP) public void onActivityStopped(@NonNull android.app.Activity activity)Description copied from interface:android.app.Application.ActivityLifecycleCallbacksCalled when the Activity callssuper.onStop().- Specified by:
- onActivityStoppedin interface- android.app.Application.ActivityLifecycleCallbacks
 
 - 
onActivitySaveInstanceState@RestrictTo(LIBRARY_GROUP) public void onActivitySaveInstanceState(@NonNull android.app.Activity activity, @NonNull android.os.Bundle outState)Description copied from interface:android.app.Application.ActivityLifecycleCallbacksCalled when the Activity callssuper.onSaveInstanceState().- Specified by:
- onActivitySaveInstanceStatein interface- android.app.Application.ActivityLifecycleCallbacks
 
 - 
getNamepublic java.lang.String getName() Description copied from interface:androidx.test.espresso.IdlingResourceReturns the name of the resources (used for logging and idempotency of registration).- Specified by:
- getNamein interface- androidx.test.espresso.IdlingResource
 
 - 
isIdleNowpublic boolean isIdleNow() Description copied from interface:androidx.test.espresso.IdlingResourceReturnstrueif resource is currently idle. Espresso will always call this method from the main thread, therefore it should be non-blocking and return immediately.- Specified by:
- isIdleNowin interface- androidx.test.espresso.IdlingResource
 
 - 
registerIdleTransitionCallbackpublic void registerIdleTransitionCallback(androidx.test.espresso.IdlingResource.ResourceCallback callback) Description copied from interface:androidx.test.espresso.IdlingResourceRegisters the givenIdlingResource.ResourceCallbackwith the resource. Espresso will call this method:- with its implementation of IdlingResource.ResourceCallbackso it can be notified asynchronously that your resource is idle
- from the main thread, but you are free to execute the callback's onTransitionToIdle from any thread
- once (when it is initially given a reference to your IdlingResource)
 You only need to call this upon transition from busy to idle - if the resource is already idle when the method is called invoking the call back is optional and has no significant impact. - Specified by:
- registerIdleTransitionCallbackin interface- androidx.test.espresso.IdlingResource
 
- with its implementation of 
 
- 
 
-