Follow these steps to integrate the DeviceAssure native SDK into your Android application.
Before You Begin
You'll need a DeviceAssure licence key to access the library. To obtain one:
- Visit the DeviceAssure contact form
- Complete the form to request an evaluation
- A member of our sales team will contact you to discuss your requirements
- An evaluation licence will be provided following your consultation
Already have a licence? Log in to access your licence key.
Prerequisites
- Android API 21+ (Android 5.0 Lollipop or higher)
Documentation
For comprehensive integration guides, API references, and advanced configuration options, visit our full documentation:
Integration Steps
Below outlines the high-level integration steps required. More detailed steps can be found in our Android Library documentation. A Sample Application with a full code examples is available below.
1. Add Dependencies
Update your build.gradle file with the following:
repositories {
maven {
url "https://java-api.deviceatlas.com/YOUR_LICENCE_KEY/"
}
}
dependencies {
implementation "com.deviceassure.android:deviceassure-lib:3.0.1"
}
2. Initialize the Library
Initialize DeviceAssure in your Application class:
DeviceValidation.init(getApplicationContext());
3. Validate the Device
Call the validation method with your licence key:
DeviceValidation.check("YOUR_LICENCE_KEY", new DeviceValidationCallback(this));
4. Handle the Response
A successful validation returns a JSON response for example:
{
"result": "AUTHENTIC",
"reason": "Device has passed all verification checks",
"isRootedDevice": false,
"isCustomRom": false,
"deviceAtlasProperties": {
"standardisedFullName": "Samsung Galaxy S21 5G",
"yearReleased": 2021,
"deviceId": 62409319
}
}
The result field indicates the validation outcome
Sample Application
- The sample applicaiton contains the following:
- Sample application demonstrating how to import and integrate the DeviceAssure Native app library
- Documentation (Javadocs also available online)