2.1.1.1.2 Initialize
Overview
Before using VerifySpeed's verification features, you need to initialize the SDK with your activity and client key, then get available verification methods.
Get started
- Setup Requirements: Follow the basic setup instructions.
Import VerifySpeed
kotlin or java
import co.verifyspeed.android.VerifySpeed;
Initializing VerifySpeed
To start using VerifySpeed, set your activity and client key:
kotlin or java
// Set your activity
VerifySpeed.setActivity(this)
// Set your client key
VerifySpeed.setClientKey("YOUR_CLIENT_KEY")
Get available verification methods
After setting your activity and client key, you can get available verification methods. The initialize()
method returns a List<MethodModel>
where each MethodModel
contains:
methodName
: The identifier used for verificationdisplayName
: A human-readable name for the method
- Kotlin
- Java
kotlin
val availableVerificationMethods = VerifySpeed.initialize().get()
java
try {
List<MethodModel> availableVerificationMethods = VerifySpeed.initialize().get();
} catch (ExecutionException | InterruptedException e) {
Log.d("Error", "Error in initialize" + e.getMessage());
}