Configuration¶
The SDK can be configured by providing a Map to the SDK. This map may contain or not the following keys/values, sorted alphabetically:
- alertstyle : Style of the layout. ("black"/"white").
- capturedbackgroundalpha : The alpha for the layer that appears when the document obverse face has been captured.
- capturedlabelicon : The name of the image that appears when the document obverse face has been captured. It should be stored in the app res/drawable folder.
- capturedlabeltext : Text that appears when the document obverse face has been captured.
- capturedlabelposition : The position for the text that appears when the document obverse face has been captured. It can be set to "top", "center" or "bottom"
- closebutton : Whether the SDK may have a close button or not. ("YES"/"NO").
- closebuttonimage : The name of the image for the close button, it should be stored in the app res/drawable folder.
- documentlabeltextbackgroundcolor: Background color of the label with information for both document faces.
- documentmobileoval : Whether a surrounding oval will be shown at the location of the document if it is found. ("YES"/"NO").
- documentmobileovalcolor : The color of the document surrounding oval. ("#XXXXXX" a color in hexadecimal value).
- documentobverselabeltext: Text for label with information to show the document obverse face.
- documentreverselabeltext: Text for label with information to show the document reverse face.
- facemobileoval : Whether the following face surrounding oval must be shown or not. ("YES"/"NO").
- facemobileovalcolor : The color of the face surrounding oval. ("#XXXXXX" a color in hexadecimal value).
- facenotfounderror : The text of the alert that will be shown if the face is not shown.
- facenotfounderrortitle : The title of the alert that will be shown if the face is not shown.
- faceshapeoval : Whether the reference shape for the face should be an oval.
- finalerror : The text of the alert that will be shown if an error has occurred while the video recording.
- finalerrortitle : The title of the alert that will be shown if an error has occurred while the video recording.
- fixedoval : Whether the fixed oval at the center of the screen must be shown or not. ("YES"/"NO")
- fixedrectangle: Whether the document template must be shown or not. ("YES"/"NO")
- fixedrectangleposition: Position of the document template. ("top","center","bottom")
- infoalert : The text of the alert shown at the beginning of the video in "onboarding" mode.
- infoalertauthenticatemode : The text of the alert shown at the beginning of the video in "authentication" mode.
- infoalertpass : The text of the alert shown at the beginning of the video in "onboarding" mode if passport document provided.
- infoalertshow: Whether the initial alert must be shown or not.("YES"/"NO")
- infoalerttitle : The title of the alert shown at the beginning of the video in "onboarding" mode.
- infoalerttitleauthenticatemode : The title of the alert shown at the beginning of the video in "authentication" mode.
- infoalerttitlepass : The title of the alert shown at the beginning of the video in "onboarding" mode if passport document provided.
- lifetype : The type of video is going to be recorded. "onboarding" for a full proof of life as SEPBLAC requires (name and surname, document obverse and document reverse) or "authentication" for only first part of the proof of life (name and surname).
- loggerfactoryclass : The logger factory class which will create a logger instance.
- metadatadate: Whether the video has a date as metadata or not. ("YES"/"NO").
- metadatatoken: Whether the video has a token as metadata or not. ("YES"/"NO").
- obversenotfounderror : The text of the alert that will be shown if the document obverse is not shown.
- obversenotfounderrortitle : The title of the alert that will be shown if the document obverse is not shown.
- permissionrefused : The text for the alert when a permission is not allowed.
- permissionrefusedtitle : The title for the alert when a permission is not allowed.
- positivebuttontitle : The title of the alert button.
- reversedetection : Whether the reverse should be detected or not. ("YES"/"NO").
- reversenotfounderror : The text of the alert that will be shown if the document reverse is not shown.
- reversenotfounderrortitle : The title of the alert that will be shown if the document reverse is not shown.
- secondsobversenotfounderror : The seconds to show obverse not found error alert when the video is smart.
- secondsreversenotfounderror : The seconds to show reverse not found error alert when the video is smart.
- secondsshowingface : The seconds to show the face.
- secondsshowingobverse : The seconds to show the obverse when the video is not smart.
- secondsshowingreverse : The seconds to show the reverse when the video is not smart.
- secondsvideotimeout : The maximum length in seconds for the video when the video is smart.
- secondsvideotimeoutonlyobverse : The maximum length in seconds for the video when the video is smart and the document has only obverse.
- showtutorial : Whether the initial tutorial has to be shown or not ("YES"/"NO").
- tickcirclecolor : Color of the circle of the tick image. Supported formats are: #RRGGBB #AARRGGBB 'red', 'blue', 'green', 'black', 'white', 'gray', 'cyan', 'magenta', 'yellow', 'lightgray', 'darkgray'.
- tickcolor : Color of the tick of the tick image. Supported formats are: #RRGGBB #AARRGGBB 'red', 'blue', 'green', 'black', 'white', 'gray', 'cyan', 'magenta', 'yellow', 'lightgray', 'darkgray'.
- tutorialalternativepath : Path to a png that will replace the gif in case it does not exists. Should be located in assets folder and loaded with path: some-name.png or file:///android_asset/some-name.png.
- tutorialbackgroundcolor : Background color of the tutorial screen. ("#XXXXXX" a color in hexadecimal value)
- tutorialcontinuebuttoncolor : Background color of the tutorial continue button. ("#XXXXXX" a color in hexadecimal value)
- tutorialcontinuebuttontext : Text of the tutorial continue button.
- tutorialcontinuebuttontextcolor : Text color of the tutorial continue button. ("#XXXXXX" a color in hexadecimal value)
- tutorialgifpath : Path to a gif to be shown at the tutorial view. Should be located in assets folder and loaded with path: some-name.gif or file:///android_asset/some-name.gif.
- tutorialpassporttext : Text of the tutorial description when a passport is selected.
- tutorialtext : Text of the tutorial description when a any document is selected.
- tutorialtextcolor : Text color of the tutorial description. ("#XXXXXX" a color in hexadecimal value)
- tutorialtitle : Title of the tutorial view.
- tutorialtitlecolor : Title color of the tutorial view. ("#XXXXXX" a color in hexadecimal value)
- videoflashingcolor : Initial color of the animation of the top and bottom labels. ("#XXXXXX" a color in hexadecimal value)
- videoinformativelabel : Whether the top label will be shown or not. ("YES"/"NO")
- videoinformativelabelbackgroundcolor : The color of the label background shown at the top of the screen. ("#XXXXXX" a color in hexadecimal value)
- videoinformativelabelbordercolor : The color of the label border shown at the top of the screen. ("#XXXXXX" a color in hexadecimal value)
- videoinformativelabelobversebackgroundcolor : The color of the label background shown at the top of the screen when showing the obverse. ("#XXXXXX" a color in hexadecimal value)
- videoinformativelabelposition : The position of the label, It can be set to "top", "center", "documentcenter" or "bottom"
- videoinformativelabelreversebackgroundcolor : The color of the label background shown at the top of the screen when showing the reverse. ("#XXXXXX" a color in hexadecimal value)
- videoinformativetext1 : The text of the label at the top of the screen to say something in the video.
- videoinformativetext2 : The text of the label at the top of the screen to show the obverse of the document.
- videoinformativetext2pass : The text of the label at the top of the screen to show the first page of the passport.
- videoinformativetext3 : The text of the label at the top of the screen to show the reverse of the document.
The default values for these keys are:
Key | Default value (en/es) |
---|---|
"alertstyle" | "black" |
"capturedbackgroundalpha" | "0.5" |
"capturedlabelicon" | "undefined" |
"capturedlabeltext" | "Captured" |
"capturedlabelposition" | "bottom" |
"closebutton" | "NO" |
"closebuttonimage" | "undefined" |
"documentlabeltextbackgroundcolor" | "#AA000000" |
"documentmobileoval" | "YES" |
"documentmobileovalcolor" | "#00CC00" |
"documentobverselabeltext" | "FRONT SIDE" |
"documentreverselabeltext" | "BACK SIDE" |
"facemobileoval" | "YES" |
"facemobileovalcolor" | "#00CC00" |
"facenotfounderror" | "You stopped looking at the camera and the process has come to a halt. Please, start again." |
"facenotfounderrortitle" | "An error has occurred" |
"faceshapeoval" | "YES" |
"finalerror" | "You have not shown the document or it was too far away and the process has come to a halt. Please, start again." |
"finalerrortitle" | "An error has occurred" |
"fixedoval" | "YES" |
"fixedrectangle" | "YES" |
"fixedrectangleposition" | "top" |
"infoalert" | "When required: Say your NAME and SURNAME. Show the FRONT SIDE of your document. Show the BACK SIDE of your document." |
"infoalertauthenticatemode" | "The application needs to record a video selfie as proof of life" |
"infoalertpass" | "When required: Say your NAME and SURNAME. Show the PAGE WITH THE DATA of the passport." |
"infoalertshow" | "NO" |
"infoalerttitle" | "Video Selfie" |
"infoalerttitleauthenticatemode" | "Video Proof of Life"< |
"infoalerttitlepass" | "Video Selfie" |
"lifetype" | "onboarding" |
"loggerfactoryclass" | "" |
"metadatadate" | "YES" |
"metadatatoken" | "YES" |
"obversenotfounderror" | "You have to show the front side of your identity document by putting it close to the camera." |
"obversenotfounderrortitle" | "" |
"permissionrefused" | "The application needs to record a video selfie as proof of life. |
"permissionrefusedtitle" | "Required permission" |
"positivebuttontitle" | "Continue |
"reversedetection" | "YES" |
"reversenotfounderror" | "You have to show the back side of your identity document by putting it close to the camera." |
"reversenotfounderrortitle" | "" |
"secondsobversenotfounderror" | "7" |
"secondsreversenotfounderror" | "12" |
"secondsshowingface" | "7" |
"secondsshowingobverse" | "6" |
"secondsshowingreverse" | "6" |
"secondsvideotimeout" | "41" |
"secondsvideotimeoutonlyobverse" | "17" |
"showtutorial" | "NO" |
"tickcirclecolor" | "#FF424242" |
"tickcolor" | "#FFFFFFFF" |
"tutorialalternativepath" | "" |
"tutorialbackgroundcolor" | "#424242" |
"tutorialcontinuebuttoncolor" | "#116466" |
"tutorialcontinuebuttontext" | "Continue" |
"tutorialcontinuebuttontextcolor" | "#ffffff" |
"tutorialgifpath" | "" |
"tutorialpassporttext" | "When required: Say your NAME and SURNAME. Show the PAGE WITH THE DATA of the passport." |
"tutorialtext" | "When required: Say your NAME and SURNAME. Show the FRONT SIDE of your document. Show the BACK SIDE of your document." |
"tutorialtextcolor" | "#ffffff" |
"tutorialtitle" | "Video Selfie" |
"tutorialtitlecolor" | "#ffffff" |
"videoinformativelabel" | "YES" |
"videoinformativelabelbackgroundcolor" | "#AA000000" |
"videoinformativelabelbordercolorhex" | "NULL" |
"videoinformativelabelobversebackgroundcolor" | "#AA000000" |
"videoinformativelabelposition" | "top" |
"videoinformativelabelreversebackgroundcolor" | "#AA000000" |
"videoinformativetext1" | "Say your NAME and SURNAME" |
"videoinformativetext2" | "Show the FRONT SIDE of the document." |
"videoinformativetext2pass" | "Show the page that contains the data of the passport. |
"videoinformativetext3" | "And now the BACK SIDE." |
Format texts¶
All the Strings can be formated by using HTML tags. If the String is stored in an XML file, the String should be in a CDATA section. A CDATA section starts with "<![CDATA[" and ends with "]]>".
Fonts¶
To change the SDK font family, the SDK styles can be overwritten. These are the SDK styles:
General style
<style name="VDVideoSelfieCaptureTheme.NoTitleNavBar" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent
</item>
<item name="android:windowTranslucentNavigation" tools:targetApi="kitkat">true</item>
</style>
Tutorial Activity style
<style name="VDVideoSelfieCaptureTheme.NoTitle" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
Dialogs style
<style name="VeridasDialog" parent="Theme.AppCompat.Dialog.Alert">
<item name="colorAccent">@color/dialogButton</item>
<item name="android:windowBackground">@color/transparent</item>
<item name="android:background">@color/dialogBackground</item>
</style>
<style name="VeridasLabelText" parent="TextAppearance.AppCompat">
<item name="android:textColor">#FFFFFF</item>
<item name="android:textSize">20dp</item>
</style>