Android

In this section, we will see how to integrate your Verify with Synaps component easily.

If you need any assistance, don't hesitate to contact technical support at riwan@synaps.io

1. Install

To get a Git project into your build:

Step 1. Add the JitPack repository to your build file

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Step 2. Add the dependency

dependencies {
  ...
  implementation 'com.github.synaps-io:android-verify:0.1.0'
}

2. Usage

First, you need to add SynapsIndividualVerify or SynapsCorporateVerify in your layout:

<io.synaps.SynapsIndividualVerify
    android:id="@+id/synaps"
    android:layout_width="match_parent"
    android:layout_height="554dp"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
/>

What is Individual or Corporate ?

If you want to know more about what is individual (KYC) or what is corporate (KYB) and how to set them up you can click on these two links:

IndividualCorporate

Second, you need to launch synaps by providing the sessionid of the user:

synaps = findViewById<SynapsIndividualVerify>(R.id.synaps);
 try {
    synaps!!.launch(SESSION_ID)
} catch (e: CameraAccessException) {
    // handle when user disable the camera permission
    ActivityCompat.requestPermissions(this,
        arrayOf<String>( Manifest.permission.CAMERA),
        SYNAPS_REQUEST_CAMERA_PERMISSION_CODE);
}

session_id ?

To get a session_id you need to create an app on Synaps Manager. Once you selected your service type, you will have to go in your "integration" tab and copy your Api-Key.

The Api-Key MUST NOT be stored in your frontend. You have to store it on your server and never on the client side. The only thing that should be exposed to the user is the session_id.

To create a session_id, you have to call the API related to the service you chose. For instance, if you chose Identity service, go to Identity > Sessions in the documentation.

Session Creation

Third, you need to need to listen setOnReadyListener to listen when the page is fully loaded.

synaps.setOnReadyListener(OnReadyListener {
 
})

Forth, you need to need to listen setOnFinishListener to listen when the user finished verification.

synaps.setOnFinishListener(OnFinishListener {
   
})

Attributes

Attribute nameAttribute typeDefaultRequiredDescription

lang

string

'en'

N

Event listener called on every open/close action

tier

int

null

N

Tier is a simply way to divide your workflow into small pieces. It is very useful when you offer different features based on the verification level of your customer. More info

primary_color

color

null

N

You can set a primary color, it will create a verification flow tailored to your compliance needs and your brand.

secondary_color

color

null

N

You can set a secondary color, it will create a verification flow tailored to your compliance needs and your brand.

Customization

Custom colors

We give you the possibility to customize your workflow with your colors. You can set a primary color and a secondary color, it will create a verification flow tailored to your compliance needs and your brand.

<io.synaps.SynapsIndividualVerify
    android:id="@+id/synaps"
    android:layout_width="match_parent"
    android:layout_height="554dp"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    app:primary_color="#090909"
    app:secondary_color="#FB0101"
/>

Custom language

You can set a predefined language for your user. Synaps already take advantage of browser language to display the relevant language to the end-user but if your user has set up a language option to your website, you can definitely pass it as an option.

<io.synaps.SynapsIndividualVerify
    android:id="@+id/synaps"
    android:layout_width="match_parent"
    android:layout_height="554dp"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    app:lang="fr"
/>

Custom tiers

As explained before in the documentation, tiers is a simply way to divide your workflow into small pieces. It is very useful when you offer different features based on the verification level of your customer.

To create your own tier, check out the step-by-step guide

Tiers

Once created, you will have your tier , You will have to pass it in the options objects while initialising the SDK.

<io.synaps.SynapsIndividualVerify
    android:id="@+id/synaps"
    android:layout_width="match_parent"
    android:layout_height="554dp"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    app:tier="234982348"
/>

Last updated