Android SDK

Andia InApp validation SDK for Android

Requirements

  • Android 2.3 (Gingerbread) or higher and includes the Google Play

  • Android Studio

Download & Install the Library

Download the AndiaAndroid zip from this Github link

Unzip the Folder AndiaAndroid.zip

Import the file andia-selfie.aar into your project in Android Studio

Click File > New > Import Module.

Enter the location of the library then click Finish.

Add the Selfie module to your project, on Android Studio Open Module Settings

In Dependencies, sellect Add Library Dependency, and then select the Selfie Library.

Using the Library

Import the classes in your Activity

import io.andia.ResultOnboarding;
import io.andia.SelfieValidator;
import io.andia.SelfieCallback;
import io.andia.ResultValidation;

In your Main Activity implement SelfieCallback

public class MainActivity extends AppCompatActivity implements SelfieCallback {
//activity Code
// ...
//Callback for OnBoarding.
public void resultOnBoaring(ResultOnboarding result){
Log.d("ANDIA", result.getMessage());
}
//Callback for Validation.
public void resultValidation(ResultValidation result){
Log.d("ANDIA", result.getMessage());
}
}

Call the OnBoarding Method.

onboardingButton = (Button) findViewById(R.id.buttonOnboard);
onboardingButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
SelfieValidator validator = new SelfieValidator();
validator.onboarding("API_KEY", MainActivity.this);
}
});

Call the Validation Method

validateButton = (Button) findViewById(R.id.buttonValidate);
validateButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
SelfieValidator validator = new SelfieValidator();
validator.validation("API_KEY", "userid", MainActivity.this);
}
});

Download Example

Example Project in this Github Link