Android SDK
Last updated
Last updated
Register your app at https://www.verifykit.com and get your client keys and server key.
Add VerifyKit SDK to your app
Configure and start VerifyKit SDK
When verification is complete, send sessionId which VerifyKit SDK gives you to your backend service.
At your server side, get user's phone number from VerifyKit service with serverKey and sessionId. You can check Rest Api Docs.
Minimum SDK Version is api 16
In your Application file you should initialize VerifyKit. VerifyKit.init() method needs VerifyKitOptions object.
You can call VerifyKit.startVerification(this) method from your Activity or Fragment then get the result via VerifyCompleteListener interface from your Activity or Fragment.
Optional: You can pass user phone number to VerifyKit with startVerification
method. In this way VerifyKit doesn’t ask phone number to user
There may be a case when user chooses a third party messaging app for validation, sends a message, but doesn't return to main app and kills it. In that case, that user is verified with VerifyKit but the main app doesn't know it yet.
To fix this, we have a method to check interrupted session status.
Open the /app/manifest/AndroidManifest.xml file.
Add the following meta-data elements, an activity for VerifyKit and intent filter for App Link inside your application element:
An Android App Link is a deep link based on your website URL that has been verified to belong to your website. So clicking one of these immediately opens your app if it's installed—the disambiguation dialog does not appear. Though the user may later change their preference for handling these links. For verifying your App Link see document.
-keep class com.verifykit.sdk.core** { *; }
When the verification is complete, in order to get information of the verified user, you should integrate with VerifyKit Rest API. After receiving the sessionID variable from the Web SDK, you can fetch your client's data, such as phone numbers , from VerifyKit Rest API service.
This integration requires a ServerKey token that is unique to your application in VerifyKit and used as both an identifier and a security measure. For this reason, you have to use your ServerKey token in backend integration. You can not use ServerKey on your client-side.
For further info on how to integrate this part please click here.
Need some help?
We all need a little help sometimes. If you have any question or request, feel free to create an issue.