Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 48 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
Title: TransUnion TruValidate Device Risk Android SDK Library

# TRUVALIDATE DEVICE RISK ANDROID SDK LIBRARY
# TRANSUNION TRUVALIDATE DEVICE RISK ANDROID SDK LIBRARY

## What is TruValidate Device Risk?
**FraudForce is now Device Risk. Our device-based products, such as Device Risk and Device-Based Authentication (formerly ClearKey), are critical components of our fraud and identity solutions; the new names make it easy to quickly understand our extensive capabilities. We have united these solutions under the TransUnion TruValidate brand. We have taken care not to update anything that might affect your implementations; as a result you'll still see legacy names in some places.**
Expand All @@ -20,8 +18,8 @@ The Device Risk SDK integrates with native and hybrid apps. Hybrid apps mix nati

| | |
|---------------------------------|-------------------------------------------------------------------------------------------------------------------|
| **SDK Filename** | fraudforce-lib-release-4.3.2.aar |
| **Version** | 4.3.2 |
| **SDK Filename** | fraudforce-lib-release-5.0.0.aar |
| **Version** | 5.0.0 |
| **Package** | com.iovation.mobile.android.FraudForce |
| **Android SDK Dependencies** | Android SDK 5.0 or higher (SDK level 21) |
| **Library Dependencies** | None |
Expand All @@ -39,21 +37,21 @@ The Device Risk SDK integrates with native and hybrid apps. Hybrid apps mix nati

> __NOTE__ Android 10 introduced the ACCESS_BACKGROUND_LOCATION permission, protected at the dangerous level as is the case for ACCESS_FINE_LOCATION. Refer to the official Android documentation for when to incorporate this permission.

Version 4.3.2 of the TruValidate Device Risk SDK for Android supports Android 5.0 or higher.
Version 5.0.0 of the TruValidate Device Risk SDK for Android supports Android 5.0 or higher.

## Installing the Device Risk SDK for Android

1. Download iovation-android-sdk-4.3.2.zip from here: [iovation Mobile SDK for Android](https://github.com/iovation/deviceprint-SDK-Android). 
1. Download iovation-android-sdk-5.0.0.zip from here: [iovation Mobile SDK for Android](https://github.com/iovation/deviceprint-SDK-Android). 

2. Unzip iovation-android-sdk-4.3.2.zip.
2. Unzip iovation-android-sdk-5.0.0.zip.

3. Depending on your IDE, do one of the following:
3. Depending on your IDE, do one of the following:

- In __Maven__, deploy the AAR file to your local Maven repository, using maven-deploy. For more information, see [Guide to installing 3rd party JARs](http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html).
- In __Maven__, deploy the AAR file to your local Maven repository, using maven-deploy. For more information, see [Guide to installing 3rd party JARs](http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html).

- If you are using __Gradle__, add the *fraudforce-lib-release-4.3.2.aar* file to your application module's libs directory. Then, edit the *build.gradle* file in order to add the libs directory as a flat-file repository to the `buildscript` and `repository` sections. This makes the fraudforce-lib-release-4.3.2.aar file accessible to Gradle.
- If you are using __Gradle__, add the *fraudforce-lib-release-5.0.0.aar* file to your application module's libs directory. Then, edit the *build.gradle* file in order to add the libs directory as a flat-file repository to the `buildscript` and `repository` sections. This makes the fraudforce-lib-release-5.0.0.aar file accessible to Gradle.

```
```
buildscript {
repositories {
flatDir {
Expand All @@ -67,26 +65,36 @@ Version 4.3.2 of the TruValidate Device Risk SDK for Android supports Android 5.
dirs 'libs'
}
}
```
Also in the application module's `build.gradle` file, make sure that fraudforce-lib-release-4.3.2 is included as a dependency:
```
Also in the application module's `build.gradle` file, make sure that fraudforce-lib-release-5.0.0 is included as a dependency:

```
```
dependencies {
...
implementation(name:'fraudforce-lib-release-4.3.2', ext:'aar')
implementation(name:'fraudforce-lib-release-5.0.0', ext:'aar')
}
```
```

Alternatively, you can include the dependency without exposing your libs folder as a repository by declaring it in the module's `build.gradle` file as follows:

```
dependencies {
...
implementation('libs/fraudforce-lib-release-4.3.2.aar')
implementation files('libs/fraudforce-lib-release-5.0.0.aar')
}
```
```

Save the `build.gradle` file.
Save the `build.gradle` file.

4. If you are not already using Java 8 in your project, please include the following code into your application's 'build.gradle' file.
```
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
```

## Integrating into Native Apps

Expand Down Expand Up @@ -123,7 +131,7 @@ To integrate into native apps:
3. Initialize the FraudForceManager class using the generated FraudForceConfiguration object, and the application context.

```
FraudForceManager fraudForceManager = FraudForceManager.getInstance();
FraudForceManager fraudForceManager = FraudForceManager.INSTANCE;
fraudForceManager.initialize(configuration, context);
```

Expand All @@ -134,13 +142,13 @@ To integrate into native apps:
> __NOTE__: As with initialization, pass the application context when refreshing.

```
FraudForceManager.getInstance().refresh(context);
FraudForceManager.INSTANCE.refresh(context);
```

4. To generate the blackbox, call the getBlackbox(Context context) function on an instance of FraudForceManager. This method is a **blocking** call so it is **recommended** to call it on a background thread/coroutine.
5. To generate the blackbox, call the getBlackbox(Context context) function on an instance of FraudForceManager. This method is a **blocking** call so it is **recommended** to call it on a background thread/coroutine.

```
String blackbox = FraudForceManager.getInstance().getBlackbox(context);
String blackbox = FraudForceManager.INSTANCE.getBlackbox(context);
```

## Integrating into Hybrid Apps
Expand Down Expand Up @@ -182,7 +190,7 @@ Integrate into hybrid apps by implementing the following workflow for collecting
3. Initialize the FraudForceManager class using the generated FraudForceConfiguration object, and the application context.

```
FraudForceManager fraudForceManager = FraudForceManager.getInstance();
FraudForceManager fraudForceManager = FraudForceManager.INSTANCE;
fraudForceManager.initialize(configuration, context);
```

Expand All @@ -192,7 +200,7 @@ Integrate into hybrid apps by implementing the following workflow for collecting
wv.setWebViewClient(new WebViewClient() {
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
FraudForceManager.getInstance().refresh(getContext());
FraudForceManager.INSTANCE.refresh(getContext());
super.onPageStarted(view, url, favicon);
}

Expand All @@ -202,7 +210,7 @@ Integrate into hybrid apps by implementing the following workflow for collecting
if (url.startsWith("iov://") && ref.length > 1 && ref[1] != null) {
String injectedJavascript="javascript:(function() { " +
"document.getElementById('" + ref[1] + "').value = '"
+ FraudForceManager.getInstance().getBlackbox(wv.getContext())
+ FraudForceManager.INSTANCE.getBlackbox(wv.getContext())
+ "';})()";
wv.loadUrl(injectedJavascript);
return true;
Expand Down Expand Up @@ -239,7 +247,7 @@ The SDK includes the ability to make a network call to TransUnion TruValidate's

1 In Android Studio, select File | Open or click **Open Existing Android Studio Project** from the quick-start screen.

2. From the directory where you unzipped fraudforce-lib-release-4.3.2.zip or cloned the repo, open the **android-studio-sample-app** directory.
2. From the directory where you unzipped fraudforce-lib-release-5.0.0.zip or cloned the repo, open the **android-studio-sample-app** directory.

3. In the project navigation view, open `src/main/java/com/iovation/mobile/android/sample/MainActivity.java`

Expand All @@ -255,6 +263,18 @@ The SDK includes the ability to make a network call to TransUnion TruValidate's

## Changelog

### 5.0.0
- **Java 8 is now required.**
- **The SDK has migrated to Kotlin (1.5.30).**
- If your application does not already include the Kotlin standard library (i.e. your application
- is written entirely in Java), then you must include the kotlin stdlib as a dependency.
- **FraudForceManager can be accessed as a Kotlin object or via FraudForceManager.INSTANCE when using Java).**
- Targeting Android 12 (API 31).
- Changes to cryptography uses.
- Adjusted collection details.
- Improvements to detail caching.
- Fixed Proguard rules.

### 4.3.2
- Adjusted root detection.

Expand Down
11 changes: 8 additions & 3 deletions android-studio-sample-app/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "com.iovation.mobile.android.sample.sampleapp"
minSdkVersion 21
targetSdkVersion 31
versionCode 3
versionName "4.3.2"
versionCode 4
versionName "5.0.0"
}
buildTypes {
release {
Expand All @@ -19,9 +19,14 @@ android {
lintOptions {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation files('libs/fraudforce-lib-release-4.3.2.aar')
implementation files('libs/fraudforce-lib-release-5.0.0.aar')
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.5.30"
}
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public void onCreate() {
.subscriberKey("REPLACE WITH SUBSCRIBER KEY")
.build();

FraudForceManager fraudForceManager = FraudForceManager.getInstance();
FraudForceManager fraudForceManager = FraudForceManager.INSTANCE;
fraudForceManager.initialize(fraudForceConfiguration, getApplicationContext());
super.onCreate();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class NativeActivity extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

FraudForceManager.getInstance().refresh(getApplicationContext());
FraudForceManager.INSTANCE.refresh(getApplicationContext());

setContentView(R.layout.activity_main);
}
Expand All @@ -39,7 +39,7 @@ public void printDevice(View target) {
private class PrintThread extends AsyncTask<Void, Void, String> {
@Override
protected String doInBackground(Void... voids) {
return FraudForceManager.getInstance().getBlackbox(getApplicationContext());
return FraudForceManager.INSTANCE.getBlackbox(getApplicationContext());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void onCreate(Bundle savedInstanceState) {
wv.setWebViewClient(new WebViewClient() {
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
FraudForceManager.getInstance().refresh(wv.getContext());
FraudForceManager.INSTANCE.refresh(wv.getContext());
super.onPageStarted(view, url, favicon);
}

Expand All @@ -38,7 +38,7 @@ public boolean shouldOverrideUrlLoading(WebView view, String url) {
String[] ref = url.split("#");
if (url.startsWith("iov://") && ref.length > 1 && ref[1] != null) {
String injectedJavascript="javascript:(function() { " +
"document.getElementById('" + ref[1] + "').value = '" + FraudForceManager.getInstance().getBlackbox(getApplicationContext()) +
"document.getElementById('" + ref[1] + "').value = '" + FraudForceManager.INSTANCE.getBlackbox(getApplicationContext()) +
"';})()";
wv.loadUrl(injectedJavascript);
return true;
Expand Down
Binary file removed fraudforce-lib-release-4.3.2.aar
Binary file not shown.
Binary file added fraudforce-lib-release-5.0.0.aar
Binary file not shown.
11 changes: 10 additions & 1 deletion release-notes.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
### What's new
- Adjusted root detection.
- **Java 8 is now required.**
- **The SDK has migrated to Kotlin (1.5.30).**
- If your application does not already include the Kotlin standard library (i.e. your application
- is written entirely in Java), then you must include the kotlin stdlib as a dependency.
- **FraudForceManager can be accessed as a Kotlin object or via FraudForceManager.INSTANCE when using Java).**
- Targeting Android 12 (API 31).
- Changes to cryptography uses.
- Adjusted collection details.
- Improvements to detail caching.
- Fixed Proguard rules.