Legacy Android SDK
2.2.1
2.2.1
  • Introduction
  • Requirements
  • Downloading
  • Setup
  • Initialization
    • Network Security Settings
  • User Management
    • Create User
    • User status
    • Delete engine enrol
    • Delete User
  • Face Engine
    • Liveness Detection
      • Liveness Customisation
    • Face Verification
    • Camera Helper
  • Voice Engine
    • Initialization
    • Audio Recording
    • Recording Submission
  • Document Engine
    • Validate document
    • Validate entity
  • Enums
Powered by GitBook
On this page
  • Secure connection
  • Unsecure connections
  1. Initialization

Network Security Settings

Singleton class

Secure connection

For all the following network configurations take notice that this singleton class should be altered before the SDK initialization procedure. This is not a rule but it will assure that all the connections will be properly secured for that moment on.

NetworkSecuritySettings.getInstance().setHostname("api.example.com")

ArrayList<String> sha256_pins = new ArrayList<>();
sha256_pins.add("EohwrK1N7rr3bRQphPj4j2cel+B2d0NNbM9PWHNDXpM=");
sha256_pins.add("YEnyhAxjrMAeVokI+23XQv1lzV3IBb3zs+BA2EUeLFI=");

NetworkSecuritySettings.getInstance().setPins(sha256_pins);

Its recommended to have at least two different pins so that the application always has a fallback.

Unsecure connections

For testing purposes its possivo to enable http connections discarding all security measures regarding the connection to the API. In this case the developer should ignore the previous subject completly.

NetworkSecuritySettings.getInstance().isConnectionSecured(false);
//By default this paramenter is set to true.
PreviousInitializationNextUser Management

Last updated 5 years ago