public class Digified
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
cancelCapture()
cancelling the capture request (usually will be used if capture timeout passed and you want
to allow the user to cancel the capturing request)
|
void |
capture(FragmentManager fragmentManager,
int containerId,
int captureType,
CaptureCallback captureCallback)
This method is used to capture images (ID front image, ID back image and Selfie)
|
void |
capture(FragmentManager fragmentManager,
int containerId,
int captureType,
int desiredWidth,
int desiredHeight,
CaptureCallback captureCallback)
This method is used to capture images (ID front image, ID back image and Selfie)
|
int |
getFinalStatus()
Use this method to get the final status of the verification process, the final status will be
on of those statuses
DigifiedConstants.Status |
static Digified |
getInstance(Context context,
String baseUrl,
String apiKey)
creating Digified object
|
int |
getNextAction()
Use this method to get the next action that you should let the user perform based on
the predefined sequence in the SDK.
|
void |
initialize(String warningAction,
String userName,
String phoneNumber,
String email,
InitializeCallback callback)
Performs the init request of the API
|
void |
resetSequence()
rests the SDK to the initial stats
|
void |
send(CaptureResult captureResult,
FaceMatchCallback faceMatchCallback)
Sending the captured selfie image (encapsulated in CaptureResult object) to the API
CaptureResult will be obtained after calling
capture(FragmentManager, int, int, CaptureCallback)
or capture(FragmentManager, int, int, int, int, CaptureCallback) |
void |
send(CaptureResult captureResult,
IdExtractionCallback idExtractionCallback)
Sending the captured image of ID front and back
(encapsulated in CaptureResult object) to the API
CaptureResult will be obtained after calling
capture(FragmentManager, int, int, CaptureCallback)
or capture(FragmentManager, int, int, int, int, CaptureCallback) |
void |
setCaptureTimeout(int captureTimeoutMillis)
Setting the capture time out, this controls when will
CaptureCallback.onTimeout()
is called |
void |
setMaxDimensions(int maxWidth,
int maxHeight)
Setting the max dimensions of images not to be exceeded after cropping the image
(the exact size of the cropped image can't be set to avoid stretching the image)
|
public static Digified getInstance(Context context, String baseUrl, String apiKey)
context
- contextbaseUrl
- https url of the backend hosting Digified APIapiKey
- API Key of the Digified APIpublic void setMaxDimensions(int maxWidth, int maxHeight)
maxWidth
- maximum width of the output imagemaxHeight
- maximum height of the output imagepublic void setCaptureTimeout(int captureTimeoutMillis)
CaptureCallback.onTimeout()
is calledcaptureTimeoutMillis
- time out in milli secondspublic int getFinalStatus()
DigifiedConstants.Status
public int getNextAction()
DigifiedConstants.Action
public void resetSequence()
public void initialize(@Nullable String warningAction, @Nullable String userName, @Nullable String phoneNumber, @Nullable String email, @NonNull InitializeCallback callback)
warningAction
- setting the warning action for the api (optional - set to null if you will not use it)userName
- name of the user (optional - set to if you will not use it)phoneNumber
- user's phone number (optional - set to null if you will not use it)email
- user's email (optional - set to null if you will not use it)callback
- callback interface to let you know the status of the requestpublic void capture(FragmentManager fragmentManager, int containerId, int captureType, CaptureCallback captureCallback)
fragmentManager
- FragmentManager that will handle the display of the fragments of the SDKcontainerId
- Resource Id of the view that will be replaced with the capturing fragmentcaptureType
- Specifies what you are capturing (ID Front, ID Back or Selfie)
find the types here DigifiedConstants.CaptureType
captureCallback
- interface that will let you deal with the capture requestpublic void capture(FragmentManager fragmentManager, int containerId, int captureType, int desiredWidth, int desiredHeight, CaptureCallback captureCallback)
fragmentManager
- FragmentManager that will handle the display of the fragments of the SDKcontainerId
- Resource Id of the view that will be replaced with the capturing fragmentcaptureType
- Specifies what you are capturing (ID Front, ID Back or Selfie)
find the types here DigifiedConstants.CaptureType
desiredWidth
- required image width (not guaranteed in order not to stretch the image,
however SDK will not exceed that width)desiredHeight
- required image height (not guaranteed in order not to stretch the image,
however SDK will not exceed that height)captureCallback
- interface that will let you deal with the capture requestpublic void cancelCapture()
public void send(CaptureResult captureResult, IdExtractionCallback idExtractionCallback)
capture(FragmentManager, int, int, CaptureCallback)
or capture(FragmentManager, int, int, int, int, CaptureCallback)
captureResult
- CaptureResult object containing the ID Front or ID Back imageidExtractionCallback
- callback interface containing the result of the API callpublic void send(CaptureResult captureResult, FaceMatchCallback faceMatchCallback)
capture(FragmentManager, int, int, CaptureCallback)
or capture(FragmentManager, int, int, int, int, CaptureCallback)
captureResult
- CaptureResult object containing the Selfie imagefaceMatchCallback
- callback interface containing the result of the API call