Development

This page contains the information on Usage, Configuration, Result of OkayID Lite in Android, iOS and React-native

Usage

For Android, a valid license key is required to start the process.

Java
Config config = new Config.Builder()
                .setExtractAddress(true)
                .setExtractGender(true)
                .setExtractReligion(true)
                .build();

OkayLiteActivity.startMyKadScanning(this, LICENSE_KEY, config, new OkayLiteResultListener() {
    @Override
    public void onResultReceived(boolean isSuccess, int errorCode, MyKadResult result) {
        Logger.d("result => " + result);
        if (isSuccess) {
            //do something with success result
        } else {
            //do something with error
        }
    }
});

Kotlin
//By default it is true
val config = Config.Builder()
    .setExtractAddress(false)
    .setExtractReligion(false)
    .setExtractGender(false)
    .build()
        
OkayLiteActivity.startMyKadScanning(this, LICENSE_KEY,config,
{ isSuccess, errorCode, result ->
    if (isSuccess) {
        //do something with success result
    } else {
        //do something with error
    }
})

The configurations by default are set as "true"

Result

These are the explanation of the results that the OkayID Lite will be returning as follow:

Error Code

These are the error code that will be raised after each of the scanned is done.

Last updated