Package com.regula.facesdk
Class FaceSDK
java.lang.Object
com.regula.facesdk.FaceSDK
-
Field Summary
Modifier and TypeFieldDescriptionprotected final String
protected FaceCaptureCallback
protected boolean
protected boolean
protected LivenessCallback
protected String
protected WeakReference<IVideoEncoderCompletion>
-
Method Summary
Modifier and TypeMethodDescriptionboolean
deinit()
Method to deinitialize FaceSDK corevoid
detectFaces
(DetectFacesRequest request, DetectFacesCompletion completion) Create request to detect faces and check face image qualityGet the faceSdk versionprotected String
Getting url of the servicevoid
init
(Context context, InitCallback initCallback) Prepares Face Recognition SDK to workstatic FaceSDK
Instance()
A shared instance of the FaceSDKboolean
Method returns state of FaceSDK corevoid
matchFaces
(MatchFacesRequest request, MatchFaceCallback completion) Create match faces request for matching input on the similarity.void
matchFaces
(MatchFacesRequest request, MatchFaceConfiguration configuration, MatchFaceCallback completion) Creates match faces request to match input on the similarityvoid
presentFaceCaptureActivity
(Context context, FaceCaptureCallback completion) Start theinvalid @linkplain
face capture activity
void
presentFaceCaptureActivity
(Context context, FaceCaptureConfiguration configuration, FaceCaptureCallback completion) Start the FaceCaptureActivityvoid
setNetworkInterceptorListener
(NetworkInterceptorListener networkInterceptorListener) set listener to intercept any http request from FaceSDKvoid
setServiceUrl
(String url) Set the URL of your service.void
setVideoEncoderCompletion
(IVideoEncoderCompletion videoCompletedListener) set listener to finish uploading liveness videovoid
startLiveness
(Context context, LivenessCallback completion) Start liveness processvoid
startLiveness
(Context context, LivenessConfiguration configuration, LivenessCallback completion) Start liveness activityvoid
stopFaceCaptureActivity
(Context context) Stop the face capturing and close finish FaceCaptureActivity by contextvoid
stopLivenessProcessing
(Context context) Stop the liveness processing and activity by context
-
Field Details
-
defaultUrl
- See Also:
-
serviceUrl
-
isFaceDetecting
protected boolean isFaceDetecting -
faceCaptureCallback
-
mLivenessCallback
-
isInitialized
protected boolean isInitialized -
videoEncoderCompletion
-
-
Method Details
-
Instance
A shared instance of the FaceSDK- Returns:
- return instance of the
FaceSDK
class
-
init
Prepares Face Recognition SDK to work- Parameters:
context
- context
-
deinit
public boolean deinit()Method to deinitialize FaceSDK core- Returns:
- true when deinit was success
-
setServiceUrl
Set the URL of your service. -
getServiceUrl
Getting url of the service- Returns:
- An URL of your service in the
String
format.
-
matchFaces
Create match faces request for matching input on the similarity.- Parameters:
request
-MatchFacesRequest
Match faces request.completion
-MatchFaceCallback
the block to execute after the presentation finishes.
-
matchFaces
public void matchFaces(MatchFacesRequest request, MatchFaceConfiguration configuration, MatchFaceCallback completion) Creates match faces request to match input on the similarity- Parameters:
request
- Match faces requestconfiguration
- FaceCaptureConfiguration the configuration information.completion
- MatchFaceCallback The block to execute after the presentation finishes.
-
presentFaceCaptureActivity
Start theinvalid @linkplain
face capture activity
- Parameters:
context
-invalid @link
Context
completion
-FaceCaptureCallback
callback that execute after the face capturing process is finished
-
presentFaceCaptureActivity
public void presentFaceCaptureActivity(Context context, FaceCaptureConfiguration configuration, FaceCaptureCallback completion) Start the FaceCaptureActivity- Parameters:
context
- allows access to application-specific resources and classesconfiguration
- provide configuration information (flags, cameraId and headers)completion
- presentation of the FaceCaptureActivity callback
-
startLiveness
Start liveness process- Parameters:
context
-invalid @link
Context
completion
-LivenessCallback
the block to execute after the onLivenessCompete finishes.
-
startLiveness
public void startLiveness(Context context, LivenessConfiguration configuration, LivenessCallback completion) Start liveness activity- Parameters:
context
-invalid @link
Context
configuration
-LivenessConfiguration
provide configuration informationcompletion
-LivenessCallback
liveness ending callback
-
stopFaceCaptureActivity
public void stopFaceCaptureActivity(Context context) Stop the face capturing and close finish FaceCaptureActivity by context- Parameters:
context
-invalid @link
Context
-
stopLivenessProcessing
public void stopLivenessProcessing(Context context) Stop the liveness processing and activity by context- Parameters:
context
-invalid @link
Context
-
getFaceSdkVersion
Get the faceSdk version- Returns:
- faceSdk module version in the
String
format
-
setNetworkInterceptorListener
public void setNetworkInterceptorListener(NetworkInterceptorListener networkInterceptorListener) set listener to intercept any http request from FaceSDK- Parameters:
networkInterceptorListener
-invalid @link
NetworkInterceptorListener
-
setVideoEncoderCompletion
public void setVideoEncoderCompletion(IVideoEncoderCompletion videoCompletedListener) set listener to finish uploading liveness video- Parameters:
videoCompletedListener
-invalid @link
IVideoEncoderCompletion
-
detectFaces
Create request to detect faces and check face image quality- Parameters:
request
-invalid @link
DetectFacesRequest
completion
-DetectFacesCompletion
the block to call when request is finished processing.
-
isInitialized
public boolean isInitialized()Method returns state of FaceSDK core- Returns:
- true when FaceSDK core was initialized successfully
-
getInternalServiceUrl
-