DeviceDNA for Android
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
.gitignore
LICENSE
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

Device DNA Android Download

The Device DNA Android library allows you to identify devices using the Judopay's platform.

Getting Started

Initialize Device DNA

1. Add the Judopay Maven repository to your root build.gradle file:
allprojects {
    repositories {
        maven {
            url "http://dl.bintray.com/judopay/maven"
        }
    }
}
2. Add Device DNA as a dependency in your app's build.gradle file:
compile 'com.judopay:device-dna:0.9+'
3. Initialize Device DNA with your Judopay credentials:
Credentials credentials = new Credentials("<TOKEN>", "<SECRET>");
DeviceDna deviceDna = new DeviceDna(this, credentials);

Server to server fraud prevention

Device DNA can be used for identifying the device for fraud prevention when performing server to server payments.

Follow the steps for integrating Device DNA as per the Getting Started guide.

1. Retrieve the device signals

Retrieve the key and value from the device at the time the user triggers the action that will result in a payment request from your server:

deviceDna.deviceSignals()
        .observeOn(AndroidSchedulers.mainThread())
        .subscribeOn(Schedulers.io())
        .subscribe(new Action1<Map<String, String>>() {
            @Override
            public void call(Map<String, String> deviceSignals) {
                String key = deviceSignals.get("key");
                String value = deviceSignals.get("value");
            }
        });

2. Send the fields to your server and include with the payment request:

Add the key, value in the clientDetails field of the request.

Example JSON

{
"clientDetails": {
    "key": "m815g6LdYB973ks9DbA==",
    "value": "fjfjLluVOT0wJ7cMO8vv00qsULrtd6Osio4Ra0mwKEpdK7YsbA=="
    }
}