ATLAS SDK is used to capture all types of location, document, face, aadhaar, data, video, email, phone, consent, video declaration.
You can find the latest changelog at Changelog.
Make sure that your project meets these requirements:
- Uses API Level
21
or above asMinimum SDK Version
- Uses Gradle 7.3 or later
- Uses Jetpack (AndroidX)
Add the following code to your project
level build.gradle
file
allprojects {
repositories {
//Maven credentials for the Atlas SDK
['atlas-sdk-android'].each { value->
maven {
url "https://www.repo2.frslabs.space/repository/${value}/"
credentials {
username '<YOUR_USERNAME>'
password '<YOUR_PASSOWRD>'
}
}
}
}
}
Add the following code to your app-level
build.gradle
file
android {
// ...
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
// ...
}
And then, add the dependencies
// ...
dependencies {
/*
* Android Dependencies used by Atlas SDK
*/
implementation 'androidx.appcompat:appcompat:<latest verison>'
implementation 'com.google.android.material:material:<latest verison>'
implementation 'androidx.constraintlayout:constraintlayout:<latest verison>'
/*
* Atlas SDK Core Dependency
*/
implementation 'com.frslabs.android.sdk:atlas:<latest version>'
}
Initialize an instance of Atlas
with the appropriate parameters, and call start()
to invoke the Atlas SDK. Refer Atlas SDK API for more information regarding the individual APIs.
Given below is the fully configured Atlas SDK invokation.
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
callAtlasSdk()
}
private fun callAtlasSdk() {
val atlasConfig = AtlasConfig.Builder()
.setCheckId("<CHECK_ID>")
.setUrlId(AtlasUrlType.STAGING) // OPTIONAL: Set environments
.build()
val atlas = Atlas(atlasConfig)
atlas.start(this, object : AtlasResultCallback {
override fun onSuccess(atlasResult: String) {
//CAPTURE SUCCESSFULLY
}
override fun onFailure(code: Int, message: String) {
Toast.makeText(this@MainActivity,"Failure",Toast.LENGTH_LONG).show()
}
})
}
}
Following error codes will be returned on the onError
method of the callback
CODE | DESCRIPTION |
---|---|
506 | No internet connection |
507 | Failed to retrieve data |
508 | Invalid settings |
509 | Permission denied |
See the below table for the public APIs of Atlas SDK,
Method/Constructor | Comments |
---|---|
Atlas(AtlasConfig atlasConfig) | Instantiates the Atlas Object |
start(Context activityContext, AtlasResultCallback atlasResultCallback) | Starts the Atlas SDK |
AtlasConfig.Builder()
allows to instantiate the AtlasConfig
object with customisable features. AtlasConfig
is to be set when instantiating Atlas
object , See Atlas
Method | Default | Required | Comments |
---|---|---|---|
setCheckId(String checkId) | NULL | Yes | Sets the check id needed for Atlas SDK |
setUrlId(AtlasUrlType atlasUrlType) | AtlasUrlType.PRODUCTION | Optional | If it is STAGING then it'll use STAGING base url |
build() | - | - | Builds AtlasConfig Instance |
For any queries/feedback , contact us at [email protected]