Customization

The customization is done independently for both platforms.

Android

  • To change the texts, add other localization to the app, change icons or videos or customize the theme check the full guide here.

  • To localize plural strings within the Android SDK call IncodeSdk.setQuantityStrings(). Example:

      await IncodeSdk.setQuantityStrings({
        en: {
          onboard_sdk_validation_attempts_remaining: {
            one: "%d attempt remaining",
            other: "%d attempts remaining"
          }
        },
        es: {
          onboard_sdk_validation_attempts_remaining: {
            one: "%d intento restante",
            other: "%d intentos restantes"
          }
        }
      });

iOS

  • To change icons or videos guide, please follow the guide here.
  • To change the texts, add other localization to the app, please follow the guide here
  • To change the theme use setTheme method, as in the following example:
const jsonTheme = JSON.stringify({
                "colors": {
                  "accent": "#00B2FD",
                  "primary": "#20263D",
                  "background": "#FFFFFF",
                  "secondaryBackground": "#E9E9EB",
                  "success": "#0CD5A2",
                  "error": "#FF5C6F",
                  "warning": "#F3AB3C",
                  "cancel": "#20263D"
                },
                "fonts": {
                  "buttonBig": {
                    "name": "CircularXXTT-Black",
                    "size": "20"
                  },
                  "buttonMedium": {
                    "name": "CircularXXTT-Black",
                    "size": "16"
                  },
                  "buttonSmall": {
                    "name": "CircularXXTT-Black",
                    "size": "12"
                  },
                  "title": {
                    "name": "CircularXXTT-Black",
                    "size": "25"
                  },
                  "hugeTitle": {
                    "name": "CircularXXTT-Black",
                    "size": "40"
                  },
                  "subtitle": {
                    "name": "CircularXXTT-Black",
                    "size": "18"
                  },
                  "boldedSubtitle": {
                    "name": "CircularXXTT-Bold",
                    "size": "18"
                  },
                  "smallSubtitle": {
                    "name": "CircularXXTT-Black",
                    "size": "14"
                  },
                  "info": {
                    "name": "CircularXXTT-Black",
                    "size": "16"
                  },
                  "body": {
                    "name": "CircularXXTT-Medium",
                    "size": "14"
                  },
                  "boldedBody": {
                    "name": "CircularXXTT-Bold",
                    "size": "14"
                  },
                  "textFieldBig": {
                    "name": "CircularXXTT-Black",
                    "size": "20"
                  },
                  "textFieldMedium": {
                    "name": "CircularXXTT-Black",
                    "size": "15"
                  }
                },
                "buttons": {
                  "primary": {
                    "states": {
                      "normal": {
                        "animateStateChange": true,
                        "alpha": 1,
                        "backgroundColor": "#00B2FD",
                        "borderColor": "",
                        "borderWidth": 0,
                        "cornerRadius": 32,
                        "shadowColor": "#000000",
                        "shadowOffset": [0,5],
                        "shadowOpacity": 0.15,
                        "shadowRadius": 9,
                        "textColor": "#FFFFFF",
                        "transform": {
                          "a": 1,
                          "b": 0,
                          "c": 0,
                          "d": 1,
                          "tx": 0,
                          "ty": 0
                        }
                      },
                      "highlighted": {
                        "animateStateChange": true,
                        "alpha": 1,
                        "backgroundColor": "#20263D",
                        "borderColor": "",
                        "borderWidth": 0,
                        "cornerRadius": 32,
                        "shadowColor": "#000000",
                        "shadowOffset": [0,5],
                        "shadowOpacity": 0.15,
                        "shadowRadius": 9,
                        "textColor": "#00B2FD",
                        "transform": {
                          "a": 1,
                          "b": 0,
                          "c": 0,
                          "d": 1,
                          "tx": 0,
                          "ty": 0
                        }
                      },
                      "disabled": {
                        "animateStateChange": true,
                        "alpha": 1,
                        "backgroundColor": "#E9E9EB",
                        "borderColor": "",
                        "borderWidth": 0,
                        "cornerRadius": 32,
                        "shadowColor": "#000000",
                        "shadowOffset": [0,5],
                        "shadowOpacity": 0,
                        "shadowRadius": 9,
                        "textColor": "#FFFFFF",
                        "transform": {
                          "a": 1,
                          "b": 0,
                          "c": 0,
                          "d": 1,
                          "tx": 0,
                          "ty": 0
                        }
                      }
                    },
                    "big": {
                      "height": 64,
                      "minWidth": 200,
                      "contentInsets": {
                        "top": 19,
                        "left": 32,
                        "bottom": 19,
                        "right": 32
                      },
                      "kerning": 0
                    },
                    "medium": {
                      "height": 46,
                      "minWidth": 0,
                      "contentInsets": {
                        "top": 12,
                        "left": 24,
                        "bottom": 12,
                        "right": 24
                      },
                      "kerning": 0
                    }
                  },
                  "secondary": {
                    "states": {
                      "normal": {
                        "animateStateChange": true,
                        "alpha": 1,
                        "backgroundColor": "#FFFFFF",
                        "borderColor": "#20263D",
                        "borderWidth": 1,
                        "cornerRadius": 32,
                        "shadowColor": "",
                        "shadowOffset": [0,0],
                        "shadowOpacity": 0,
                        "shadowRadius": 0,
                        "textColor": "#20263D",
                        "transform": {
                          "a": 1,
                          "b": 0,
                          "c": 0,
                          "d": 1,
                          "tx": 0,
                          "ty": 0
                        }
                      },
                      "highlighted": {
                        "animateStateChange": true,
                        "alpha": 1,
                        "backgroundColor": "#20263D",
                        "borderColor": "#20263D",
                        "borderWidth": 1,
                        "cornerRadius": 32,
                        "shadowColor": "",
                        "shadowOffset": [0,0],
                        "shadowOpacity": 0,
                        "shadowRadius": 0,
                        "textColor": "#00B2FD",
                        "transform": {
                          "a": 1,
                          "b": 0,
                          "c": 0,
                          "d": 1,
                          "tx": 0,
                          "ty": 0
                        }
                      },
                      "disabled": {
                        "animateStateChange": true,
                        "alpha": 1,
                        "backgroundColor": "#FFFFFF",
                        "borderColor": "#E9E9EB",
                        "borderWidth": 1,
                        "cornerRadius": 32,
                        "shadowColor": "",
                        "shadowOffset": [0,0],
                        "shadowOpacity": 0,
                        "shadowRadius": 0,
                        "textColor": "#E9E9EB",
                        "transform": {
                          "a": 1,
                          "b": 0,
                          "c": 0,
                          "d": 1,
                          "tx": 0,
                          "ty": 0
                        }
                      }
                    },
                    "big": {
                      "height": 64,
                      "minWidth": 200,
                      "contentInsets": {
                        "top": 19,
                        "left": 32,
                        "bottom": 19,
                        "right": 32
                      },
                      "kerning": 0
                    },
                    "medium": {
                      "height": 46,
                      "minWidth": 0,
                      "contentInsets": {
                        "top": 12,
                        "left": 24,
                        "bottom": 12,
                        "right": 24
                      },
                      "kerning": 0
                    }
                  },
                  "text": {
                    "states": {
                      "normal": {
                        "animateStateChange": true,
                        "alpha": 1,
                        "backgroundColor": "",
                        "borderColor": "",
                        "borderWidth": 0,
                        "cornerRadius": 0,
                        "shadowColor": "",
                        "shadowOffset": [0,0],
                        "shadowOpacity": 0,
                        "shadowRadius": 0,
                        "textColor": "#20263D",
                        "transform": {
                          "a": 1,
                          "b": 0,
                          "c": 0,
                          "d": 1,
                          "tx": 0,
                          "ty": 0
                        }
                      },
                      "highlighted": {
                        "animateStateChange": true,
                        "alpha": 1,
                        "backgroundColor": "",
                        "borderColor": "",
                        "borderWidth": 0,
                        "cornerRadius": 0,
                        "shadowColor": "",
                        "shadowOffset": [0,0],
                        "shadowOpacity": 0,
                        "shadowRadius": 0,
                        "textColor": "#00B2FD",
                        "transform": {
                          "a": 1,
                          "b": 0,
                          "c": 0,
                          "d": 1,
                          "tx": 0,
                          "ty": 0
                        }
                      },
                      "disabled": {
                        "animateStateChange": true,
                        "alpha": 1,
                        "backgroundColor": "",
                        "borderColor": "",
                        "borderWidth": 0,
                        "cornerRadius": 0,
                        "shadowColor": "",
                        "shadowOffset": [0,0],
                        "shadowOpacity": 0,
                        "shadowRadius": 0,
                        "textColor": "#E9E9EB",
                        "transform": {
                          "a": 1,
                          "b": 0,
                          "c": 0,
                          "d": 1,
                          "tx": 0,
                          "ty": 0
                        }
                      }
                    },
                    "big": {
                      "height": 40,
                      "minWidth": 200,
                      "contentInsets": {
                        "top": 8,
                        "left": 16,
                        "bottom": 8,
                        "right": 16
                      },
                      "kerning": 0
                    },
                    "medium": {
                      "height": 30,
                      "minWidth": 0,
                      "contentInsets": {
                        "top": 12,
                        "left": 24,
                        "bottom": 12,
                        "right": 24
                      },
                      "kerning": 0
                    }
                  },
                  "help": {
                    "states": {
                      "normal": {
                      "animateStateChange": true,
                      "alpha": 1,
                      "backgroundColor": "#FFFFFF",
                      "borderColor": "",
                      "borderWidth": 0,
                      "cornerRadius": 20,
                      "shadowColor": "#000000",
                      "shadowOffset": [0,5],
                      "shadowOpacity": 0.15,
                      "shadowRadius": 9,
                      "textColor": "#20263D",
                      "iconImageName": "incdOnboarding.help.clipped",
                      "iconTintColor": "#20263D",
                      "iconPosition": "left",
                      "iconPadding": 8,
                      "transform": {
                        "a": 1,
                        "b": 0,
                        "c": 0,
                        "d": 1,
                        "tx": 0,
                        "ty": 0
                      }
                      },
                      "highlighted": {
                      "animateStateChange": true,
                      "alpha": 1,
                      "backgroundColor": "#20263D",
                      "borderColor": "",
                      "borderWidth": 0,
                      "cornerRadius": 32,
                      "shadowColor": "#000000",
                      "shadowOffset": [0,5],
                      "shadowOpacity": 0.15,
                      "shadowRadius": 9,
                      "textColor": "#00B2FD",
                      "transform": {
                        "a": 1,
                        "b": 0,
                        "c": 0,
                        "d": 1,
                        "tx": 0,
                        "ty": 0
                      }
                      },
                      "disabled": {
                      "animateStateChange": true,
                      "alpha": 1,
                      "backgroundColor": "#E9E9EB",
                      "borderColor": "",
                      "borderWidth": 0,
                      "cornerRadius": 32,
                      "shadowColor": "#000000",
                      "shadowOffset": [0,5],
                      "shadowOpacity": 0,
                      "shadowRadius": 9,
                      "textColor": "#FFFFFF",
                      "transform": {
                        "a": 1,
                        "b": 0,
                        "c": 0,
                        "d": 1,
                        "tx": 0,
                        "ty": 0
                      }
                  }
                },
                "labels": {
                  "title": {
                    "textColor": "#20263D",
                    "kerning": 0
                  },
                  "secondaryTitle": {
                    "textColor": "#FFFFFF",
                    "kerning": 0
                  },
                  "subtitle": {
                    "textColor": "#20263D",
                    "kerning": 0
                  },
                  "secondarySubtitle": {
                    "textColor": "#FFFFFF",
                    "kerning": 0
                  },
                  "smallSubtitle": {
                    "textColor": "#20263D",
                    "kerning": 0
                  },
                  "info": {
                    "textColor": "#636670",
                    "kerning": 0
                  },
                  "secondaryInfo": {
                    "textColor": "#FFFFFF",
                    "kerning": 0
                  },
                  "body": {
                    "textColor": "#20263D",
                    "kerning": 0
                  },
                  "secondaryBody": {
                    "textColor": "#FFFFFF",
                    "kerning": 0
                  },
                  "code": {
                    "textColor": "#20263D",
                    "kerning": 16
                  }
                },
                "customComponents": {
                  "cameraFeedback": {
                    "alpha": 0.8,
                    "backgroundColor": "#000000",
                    "cornerRadius": 20,
                    "textBackgroundColor": "",
                    "textColor": "#FFFFFF"
                  },
                  "idCaptureHelp": {
                    "commonIssueLayoutOrientation": "horizontal"
                  },
                  "idSideLabel": {
                    "alpha": 1,
                    "backgroundColor": "#FFFFFF",
                    "borderColor": "",
                    "borderWidth": 0,
                    "cornerRadius": 5
                  }
                },
              })

IncodeSdk.setTheme({jsonTheme: jsonTheme})

Both platforms support the customization of ID v2 experience via IncodeOnboardingSdk.setTheme(theme: theme):

Android configuration guide for ID V2 scan flow can be found here.
iOS configuration guide for ID V2 scan flow can be found here.