# Customizing the Android SDK

# Debugging

To enable viewing SDK logs, use the following code:

Disable debugging before building the release version of your application.

# Logging

The SDK allows integration with a custom logger by using the .withLogTree method.

To use your custom logger:

# Analytics

The SDK collects and sends usage statistics to IDnGO servers. We do not track sensitive data; only general usage information are sent. This includes screen navigation events, interactions with UI elements, and so on.

This data is used exclusively to improve IDnGO. It is not shared with third parties and is not used for advertising.

To disable data analytics, use the following code:

# Android SDK configuration

# Theme

For SDK version 1.30.1 and above, you can use the Android theme API.

Example of creating a theme:

# Theme attributes for Android SDK

The SDK uses a Material Components theme for widgets. To configure the theme via the .withTheme() method, use the following attributes.

Theme color attributes:

  • colorPrimary — primary color for the application.
  • colorPrimaryVariant — variant of the primary color for visual contrast.
  • colorSecondary — secondary color for buttons and other elements.
  • colorSurface — background color for surfaces.
  • colorError — color for errors.
  • colorOnPrimary — text color displayed on top of the primary color.
  • colorOnSecondary — text color displayed on top of the secondary color.
  • colorOnBackground — color used for text and other content placed over the background color.
  • colorOnSurface — color used for text and other content placed over the surface color.
  • colorOnError — color used for text and other content placed over the error color.
  • colorControlNormal — default color used for UI controls such as checkboxes and switches.

# Text appearance attributes:

  • textAppearanceHeadline* — styles for headlines,
  • textAppearanceSubtitle* — styles for subtitles,
  • textAppearanceBody* — styles for multi-line body text,
  • textAppearanceButton — style for button text,
  • textAppearanceCaption — style for secondary text (supporting labels, hints, etc.),
  • textAppearanceOverline — style for secondary headings.

# Shape appearance attributes:

  • shapeAppearanceSmallComponent — shape appearance for small components.
  • shapeAppearanceMediumComponent — shape appearance for medium components.
  • shapeAppearanceLargeComponent — shape appearance for large components.

# Additional color attributes:

  • cbr_colorInit — background color for the «init» state.
  • cbr_colorOnInit — text (or icon) color for the «init» state.
  • cbr_colorPending — background color for the «pending» state.
  • cbr_colorOnPending — text (or icon) color for the «pending» state.
  • cbr_colorSuccess — background color for the «success» state.
  • cbr_colorOnSuccess — text (or icon) color for the «success» state.
  • cbr_colorRejected — background color for the «rejected» state.
  • cbr_colorOnRejected — text (or icon) color for the «rejected» state.
  • cbr_colorProcessing — background color for the «processing» state.
  • cbr_colorOnProcessing — text (or icon) color for the «processing» state.

# Default SDK theme example

# Translations

The .withLocale(Locale("ru")) method allows switching between translations during initialization.

In the «MSDK» tab of the «SDK Translations» section, you can edit the available translations for SDK text.

# Text strings

Some text strings are stored locally and are not affected by SDK language settings. For example, if the translation server is unavailable due to no internet connection, local strings will still be displayed.

To modify the strings, use the withConf property.

Warning:

withLocale does not affect text strings set locally, so you need to add translations yourself depending on the user's language.

# Contact methods

Support items define the ways users can contact your support team. By default, an item for sending an email request is automatically created. The support email address can be configured in the «Integration» section.

A support item can be one of three types:

If you want to use Type.Custom, make sure an onClick handler is set up.

# Other contact methods

If you want to modify support items, create a new list.

Each item must have a title (title), subtitle (subtitle), and icon (icon). The onClick handler is optional.

# Click handler

The SDK handles clicks by default if the support item is Type.Email or Type.Url. If you want to customize the click behavior, you can implement your own onClick handler.

# Terms of Use and Privacy policy

You can specify your Terms of Use and Privacy Policy using HTML or a URL with the following keys:

  • To provide HTML:

    • sns_tos_GTC_html (Terms of Use)
    • sns_tos_PP_html (Privacy Policy)
  • To load from a URL:

    • sns_tos_GTC_url (Terms of Use)
    • sns_tos_PP_url (Privacy Policy)