CyberSiARA™ | Android

Android Integration Guideline

1. Create a new Android Studio project.

2. Add the following code in your root build.gradle at the end of repositories:

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

3. Add the dependency in your app-level build.gradle file:

dependencies{
implementation 'com.gitlab.siarashield:siarashield_sdk:v1.0.2'
implementation 'com.github.bumptech.glide:glide:4.15.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.15.0'
}

4. Add the following code inside your button click event (for example, the Submit button). This will verify the CyberSiara Captcha before processing your form.

 String verify = CyberActivity.submitData(MainActivity.this);
        if (verify.equals("")) {
            // Captcha not verified yet
        } else if (verify.equals("true")) {
            reset();
        } else {
            // Captcha verification failed
        }
    

5. In your onCreate() method, call the reset(); method at the start to initialize CyberSiara.

reset();
    

6. Update your CyberSiara configuration with your actual Public Key, Private Key, and Package Name before running the project.

private void reset() {
    // Replace the below with your actual CyberSiara credentials and package name(Domain name is package name)
    CyberActivity.dataPass(
        "TEST-CYBERSIARA", // Public Key (example)
        "TEST-CYBERSIARA", // Private Key (example)
        "com.localhost.com",               // Package Name/Domain Name
        MainActivity.this                   // Current Activity
    );
}