├── .github └── workflows │ ├── main.yml │ └── release.yml ├── .gitignore ├── LICENSE ├── LICENSE.html ├── README.html ├── README.md ├── android-studio-sample-app ├── app │ ├── build.gradle │ ├── libs │ │ └── fraudforce-lib-release-5.2.2.aar │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── assets │ │ └── JsInjectionIntegration.html │ │ ├── java │ │ └── com │ │ │ └── iovation │ │ │ └── mobile │ │ │ └── android │ │ │ └── sample │ │ │ └── sampleapp │ │ │ ├── MainApplication.java │ │ │ ├── NativeActivity.java │ │ │ └── WebViewActivity.java │ │ └── res │ │ ├── layout │ │ ├── activity_main.xml │ │ └── activity_webview.xml │ │ ├── menu │ │ └── menu_main.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── values-v21 │ │ └── styles.xml │ │ ├── values-w820dp │ │ └── dimens.xml │ │ └── values │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── kotlinApp │ ├── .gitignore │ ├── build.gradle │ ├── libs │ │ └── fraudforce-lib-release-5.2.2.aar │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── iovation │ │ │ └── mobile │ │ │ └── android │ │ │ └── sample │ │ │ └── kotlinApp │ │ │ ├── MainActivity.kt │ │ │ └── MainApplication.kt │ │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ └── ic_launcher_background.xml │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── values-night │ │ └── themes.xml │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── themes.xml └── settings.gradle ├── fraudforce-lib-release-5.2.2.aar └── release-notes.md /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Build & Archive App 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - 'release/**' 8 | pull_request: 9 | branches: [ main ] 10 | 11 | workflow_dispatch: 12 | 13 | jobs: 14 | build: 15 | runs-on: ubuntu-latest 16 | 17 | defaults: 18 | run: 19 | working-directory: ./android-studio-sample-app 20 | 21 | steps: 22 | - name: Checkout 23 | uses: actions/checkout@v2 24 | 25 | - name: Clean 26 | run: ./gradlew clean --refresh-dependencies --stacktrace 27 | 28 | - name: Build APK 29 | run: ./gradlew --stacktrace assembleRelease 30 | 31 | - name: Build AAB 32 | run: ./gradlew --stacktrace bundleRelease 33 | 34 | - name: Archive Artifacts 35 | uses: actions/upload-artifact@v4 36 | with: 37 | name: APK & AAB artifacts 38 | path: | 39 | **/app/build/outputs/apk/ 40 | **/app/build/outputs/bundle/ 41 | !**/*.json 42 | 43 | - name: Send Slack Message 44 | uses: 8398a7/action-slack@v3 45 | with: 46 | status: ${{ job.status }} 47 | fields: repo,message,commit,author,action,eventName,ref,workflow,job,took 48 | env: 49 | SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} 50 | if: always() 51 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Draft Release 2 | 3 | on: 4 | push: 5 | tags: 6 | - 'v*' 7 | 8 | jobs: 9 | 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v2 14 | - uses: ncipollo/release-action@v1 15 | with: 16 | artifacts: "fraudforce-lib*.aar" 17 | draft: true 18 | bodyFile: "release-notes.md" 19 | token: ${{ secrets.GITHUB_TOKEN }} 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **/.gradle/** 2 | **/build/ 3 | **/.idea/ 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | iovation Software License 2 | ------------------------- 3 | 4 | IMPORTANT. READ THE FOLLOWING CAREFULLY. BY ACCEPTING THIS AGREEMENT, THE 5 | PERSON, COMPANY OR OTHER ENTITY ON WHOSE BEHALF YOU ARE ACTING IS CONSENTING 6 | TO BE BOUND BY AND BECOME A PARTY TO THIS AGREEMENT. 7 | 8 | THE FOLLOWING SOFTWARE LICENSE AGREEMENT (THIS “AGREEMENT”) CONSTITUTES A 9 | LEGAL AGREEMENT BETWEEN THE ENTITY OR COMPANY YOU REPRESENT (“LICENSEE”) AND 10 | IOVATION, INC. (“IOVATION”). BY ACCEPTING THIS AGREEMENT, YOU UNCONDITIONALLY 11 | AGREE, ON BEHALF OF LICENSEE, TO BE BOUND BY THE TERMS AND CONDITIONS OF THIS 12 | AGREEMENT. THE INDIVIDUAL ACCEPTING THIS LICENSE REPRESENTS THAT SUCH 13 | INDIVIDUAL IS AUTHORIZED TO ACCEPT THE TERMS AND CONDITIONS OF THIS AGREEMENT 14 | ON BEHALF OF THE LICENSEE. IF THE LICENSEE DOES NOT UNCONDITIONALLY AGREE TO 15 | ALL OF THE TERMS OF THIS AGREEMENT, THEN LICENSEE IS NOT AUTHORIZED TO USE 16 | THE SOFTWARE. 17 | 18 | THIS SOFTWARE LICENSE AGREEMENT IS OFFERED ONLY TO COMPANIES OR OTHER 19 | ENTITIES THAT ARE PARTIES TO A SERVICE AGREEMENT WITH IOVATION (AN “IOVATION 20 | CUSTOMER”). IF YOU ARE NOT AN IOVATION CUSTOMER, YOU ARE NOT AUTHORIZED TO 21 | ENTER INTO THIS LICENSE AGREEMENT OR TO USE THE SOFTWARE. 22 | 23 | 1. **License.** Subject to the terms and conditions of this Agreement, 24 | iovation hereby grants Licensee a nonexclusive, non-transferable, 25 | non-sublicensable, time-limited, restricted, revocable, internal license to 26 | use the downloaded software (the “Software”) solely in support of and 27 | together with the iovation ReputationManager™ service provided by iovation 28 | (the “Service”). Licensee is authorized to use the Software only during the 29 | term of Licensee’s Service Agreement with iovation and only in support of 30 | the Service. 31 | 32 | 2. **iovation’s Rights.** iovation has and will retain all ownership rights 33 | (including without limitation any copyright, patent, trade secret, 34 | trademark or other proprietary and/or intellectual property rights) in and 35 | to the Software. iovation reserves all rights not expressly granted to 36 | Client. iovation reserves the right to make changes in the Software. 37 | iovation reserves the right to amend this Agreement by notice to Licensee. 38 | 39 | 3. **Restrictions.** Licensee shall not copy, modify, reverse engineer, 40 | decompile or disassemble the Software or any part of it. Any use of the 41 | Software other than as specifically authorized herein without the prior 42 | written permission of iovation is strictly prohibited and will terminate 43 | the license granted herein. Such unauthorized use may also violate 44 | applicable laws, including without limitation copyright and other 45 | intellectual property laws. 46 | 47 | 4. **DISCLAIMER OF WARRANTY.** THE SOFTWARE IS PROVIDED “AS IS.” IOVATION DOES 48 | NOT WARRANT THAT THE SOFTWARE WILL BE ERROR-FREE, THAT IT WILL OPERATE WITH 49 | LICENSEE’S SYSTEM, OR THAT IT WILL PRODUCE ANY PARTICULAR RESULTS. IOVATION 50 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY 51 | IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR 52 | PURPOSE. LICENSEE’S EXCLUSIVE REMEDY FOR ANY DEFECT IN THE SOFTWARE SHALL 53 | BE TERMINATION OF THIS AGREEMENT. THIS REMEDY CONSTITUTES THE SOLE REMEDY 54 | AGAINST IOVATION FOR ANY CLAIMS CONCERNING THE SOFTWARE OR THIS AGREEMENT. 55 | 56 | 5. **LIMITATION OF LIABILITY.** IN NO EVENT WILL IOVATION BE LIABLE FOR ANY 57 | LOSSES OR DAMAGES INCURRED BY LICENSEE OR ANY OTHER PERSON, WHETHER DIRECT, 58 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL, INCLUDING LOST 59 | OR ANTICIPATED PROFITS, SAVINGS, INTERRUPTION TO BUSINESS, LOSS OF BUSINESS 60 | OPPORTUNITIES, LOSS OF BUSINESS INFORMATION, THE COST OF RECOVERING SUCH 61 | LOST INFORMATION, THE COST OF SUBSTITUTE INTELLECTUAL PROPERTY OR ANY OTHER 62 | PECUNIARY LOSS ARISING FROM THE USE OF, OR THE INABILITY TO USE, THE 63 | SOFTWARE REGARDLESS OF WHETHER IOVATION HAS BEEN ADVISED OF THE POSSIBILITY 64 | OF SUCH DAMAGES. IOVATION’S AGGREGATE LIABILITY IN RESPECT OF ANY AND ALL 65 | CLAIMS WILL BE LIMITED TO ONE HUNDRED DOLLARS ($100.00). THE FOREGOING 66 | LIMITATIONS APPLY REGARDLESS OF THE CAUSE OR CIRCUMSTANCES GIVING RISE TO 67 | SUCH LOSS, DAMAGE OR LIABILITY. 68 | 69 | 6. **Term and Termination.** This Agreement shall commence on the date 70 | Licensee accepts these terms and shall continue until terminated. This 71 | Agreement shall terminate automatically upon termination of iovation’s 72 | contract to provide the Service to Licensee. iovation may terminate this 73 | Agreement immediately on notice to Licensee in the event Licensee breaches 74 | any of the terms hereof. 75 | 76 | 7. **Confidentiality.** Licensee agrees that the Software constitutes 77 | Confidential Information of iovation. Licensee will not disclose or 78 | otherwise disseminate the Software or any information concerning the 79 | Software to any third party. Licensee will use the Software only internally 80 | and in accordance with this Agreement. 81 | 82 | 8. **General Terms.** 83 | 84 | 1. This Agreement constitutes the entire agreement between the parties 85 | with respect to the subject matter hereof and replaces all prior 86 | communications. This Agreement may not be modified or waived except in 87 | a writing signed by iovation. 88 | 89 | 2. Headings used herein are for convenience only and shall not be 90 | construed a part of, or affect the construction or interpretation of, 91 | any provision of this Agreement. 92 | 93 | 3. Each party is an independent contractor. Nothing stated in this 94 | Agreement shall be construed as constituting a partnership agreement or 95 | as creating relationships of employer and employee, master and servant, 96 | or principal and agent between the parties. 97 | 98 | 4. This Agreement may not be assigned or sublicensed by Licensee without 99 | obtaining iovation’s prior written consent. 100 | 101 | 5. If any provision of this Agreement is held invalid or unenforceable, 102 | the remainder of this Agreement shall nevertheless remain in full force 103 | and effect. 104 | 105 | 6. All notices pursuant to this Agreement shall be in writing and shall be 106 | sent via e-mail to iovation atlegal@iovation.com or to Client at the 107 | email address entered at the time the Software is downloaded. Notices 108 | shall be deemed effective upon receipt, or if delivery is not effected 109 | by reason of some fault of the addressee, when tendered. 110 | 111 | 7. If arbitration or litigation is commenced by either party to enforce or 112 | interpret any of the provisions of this Agreement, the prevailing party 113 | shall be entitled to recover reasonable costs and attorneys’ fees at 114 | the arbitration, at trial, on appeal, and on any petition for review. 115 | 116 | 8. Licensee acknowledges that breach of this Agreement would cause 117 | irreparable harm to iovation. Licensee therefore agrees to the entry of 118 | temporary, preliminary and permanent injunctions by any court of 119 | competent jurisdiction to prevent breach, or to compel performance, of 120 | this Agreement. This remedy is in addition to any other remedy 121 | available to iovation for breach of this Agreement. 122 | 123 | 9. This Agreement shall be deemed to have been executed in, and shall be 124 | exclusively governed by and interpreted in accordance with the laws of 125 | the State of Oregon, U.S.A., including federal law, but excluding 126 | choice of law rules. Licensee consents to the jurisdiction of the state 127 | and federal courts of Oregon in connection with any claim arising out 128 | of or related to this Agreement. 129 | -------------------------------------------------------------------------------- /LICENSE.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

iovation Software License

8 | 9 |

IMPORTANT. READ THE FOLLOWING CAREFULLY. BY ACCEPTING THIS AGREEMENT, THE 10 | PERSON, COMPANY OR OTHER ENTITY ON WHOSE BEHALF YOU ARE ACTING IS CONSENTING 11 | TO BE BOUND BY AND BECOME A PARTY TO THIS AGREEMENT.

12 | 13 |

THE FOLLOWING SOFTWARE LICENSE AGREEMENT (THIS “AGREEMENT”) CONSTITUTES A 14 | LEGAL AGREEMENT BETWEEN THE ENTITY OR COMPANY YOU REPRESENT (“LICENSEE”) AND 15 | IOVATION, INC. (“IOVATION”). BY ACCEPTING THIS AGREEMENT, YOU UNCONDITIONALLY 16 | AGREE, ON BEHALF OF LICENSEE, TO BE BOUND BY THE TERMS AND CONDITIONS OF THIS 17 | AGREEMENT. THE INDIVIDUAL ACCEPTING THIS LICENSE REPRESENTS THAT SUCH 18 | INDIVIDUAL IS AUTHORIZED TO ACCEPT THE TERMS AND CONDITIONS OF THIS AGREEMENT 19 | ON BEHALF OF THE LICENSEE. IF THE LICENSEE DOES NOT UNCONDITIONALLY AGREE TO 20 | ALL OF THE TERMS OF THIS AGREEMENT, THEN LICENSEE IS NOT AUTHORIZED TO USE 21 | THE SOFTWARE.

22 | 23 |

THIS SOFTWARE LICENSE AGREEMENT IS OFFERED ONLY TO COMPANIES OR OTHER 24 | ENTITIES THAT ARE PARTIES TO A SERVICE AGREEMENT WITH IOVATION (AN “IOVATION 25 | CUSTOMER”). IF YOU ARE NOT AN IOVATION CUSTOMER, YOU ARE NOT AUTHORIZED TO 26 | ENTER INTO THIS LICENSE AGREEMENT OR TO USE THE SOFTWARE.

27 | 28 |
    29 |
  1. License. Subject to the terms and conditions of this Agreement, 30 | iovation hereby grants Licensee a nonexclusive, non-transferable, 31 | non-sublicensable, time-limited, restricted, revocable, internal license to 32 | use the downloaded software (the “Software”) solely in support of and 33 | together with the iovation ReputationManager™ service provided by iovation 34 | (the “Service”). Licensee is authorized to use the Software only during the 35 | term of Licensee’s Service Agreement with iovation and only in support of 36 | the Service.

  2. 37 |
  3. iovation’s Rights. iovation has and will retain all ownership rights 38 | (including without limitation any copyright, patent, trade secret, 39 | trademark or other proprietary and/or intellectual property rights) in and 40 | to the Software. iovation reserves all rights not expressly granted to 41 | Client. iovation reserves the right to make changes in the Software. 42 | iovation reserves the right to amend this Agreement by notice to Licensee.

  4. 43 |
  5. Restrictions. Licensee shall not copy, modify, reverse engineer, 44 | decompile or disassemble the Software or any part of it. Any use of the 45 | Software other than as specifically authorized herein without the prior 46 | written permission of iovation is strictly prohibited and will terminate 47 | the license granted herein. Such unauthorized use may also violate 48 | applicable laws, including without limitation copyright and other 49 | intellectual property laws.

  6. 50 |
  7. DISCLAIMER OF WARRANTY. THE SOFTWARE IS PROVIDED “AS IS.” IOVATION DOES 51 | NOT WARRANT THAT THE SOFTWARE WILL BE ERROR-FREE, THAT IT WILL OPERATE WITH 52 | LICENSEE’S SYSTEM, OR THAT IT WILL PRODUCE ANY PARTICULAR RESULTS. IOVATION 53 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY 54 | IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR 55 | PURPOSE. LICENSEE’S EXCLUSIVE REMEDY FOR ANY DEFECT IN THE SOFTWARE SHALL 56 | BE TERMINATION OF THIS AGREEMENT. THIS REMEDY CONSTITUTES THE SOLE REMEDY 57 | AGAINST IOVATION FOR ANY CLAIMS CONCERNING THE SOFTWARE OR THIS AGREEMENT.

  8. 58 |
  9. LIMITATION OF LIABILITY. IN NO EVENT WILL IOVATION BE LIABLE FOR ANY 59 | LOSSES OR DAMAGES INCURRED BY LICENSEE OR ANY OTHER PERSON, WHETHER DIRECT, 60 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL, INCLUDING LOST 61 | OR ANTICIPATED PROFITS, SAVINGS, INTERRUPTION TO BUSINESS, LOSS OF BUSINESS 62 | OPPORTUNITIES, LOSS OF BUSINESS INFORMATION, THE COST OF RECOVERING SUCH 63 | LOST INFORMATION, THE COST OF SUBSTITUTE INTELLECTUAL PROPERTY OR ANY OTHER 64 | PECUNIARY LOSS ARISING FROM THE USE OF, OR THE INABILITY TO USE, THE 65 | SOFTWARE REGARDLESS OF WHETHER IOVATION HAS BEEN ADVISED OF THE POSSIBILITY 66 | OF SUCH DAMAGES. IOVATION’S AGGREGATE LIABILITY IN RESPECT OF ANY AND ALL 67 | CLAIMS WILL BE LIMITED TO ONE HUNDRED DOLLARS ($100.00). THE FOREGOING 68 | LIMITATIONS APPLY REGARDLESS OF THE CAUSE OR CIRCUMSTANCES GIVING RISE TO 69 | SUCH LOSS, DAMAGE OR LIABILITY.

  10. 70 |
  11. Term and Termination. This Agreement shall commence on the date 71 | Licensee accepts these terms and shall continue until terminated. This 72 | Agreement shall terminate automatically upon termination of iovation’s 73 | contract to provide the Service to Licensee. iovation may terminate this 74 | Agreement immediately on notice to Licensee in the event Licensee breaches 75 | any of the terms hereof.

  12. 76 |
  13. Confidentiality. Licensee agrees that the Software constitutes 77 | Confidential Information of iovation. Licensee will not disclose or 78 | otherwise disseminate the Software or any information concerning the 79 | Software to any third party. Licensee will use the Software only internally 80 | and in accordance with this Agreement.

  14. 81 |
  15. General Terms.

  16. 82 |
  17. This Agreement constitutes the entire agreement between the parties 83 | with respect to the subject matter hereof and replaces all prior 84 | communications. This Agreement may not be modified or waived except in 85 | a writing signed by iovation.

  18. 86 |
  19. Headings used herein are for convenience only and shall not be 87 | construed a part of, or affect the construction or interpretation of, 88 | any provision of this Agreement.

  20. 89 |
  21. Each party is an independent contractor. Nothing stated in this 90 | Agreement shall be construed as constituting a partnership agreement or 91 | as creating relationships of employer and employee, master and servant, 92 | or principal and agent between the parties.

  22. 93 |
  23. This Agreement may not be assigned or sublicensed by Licensee without 94 | obtaining iovation’s prior written consent.

  24. 95 |
  25. If any provision of this Agreement is held invalid or unenforceable, 96 | the remainder of this Agreement shall nevertheless remain in full force 97 | and effect.

  26. 98 |
  27. All notices pursuant to this Agreement shall be in writing and shall be 99 | sent via e-mail to iovation atlegal@iovation.com or to Client at the 100 | email address entered at the time the Software is downloaded. Notices 101 | shall be deemed effective upon receipt, or if delivery is not effected 102 | by reason of some fault of the addressee, when tendered.

  28. 103 |
  29. If arbitration or litigation is commenced by either party to enforce or 104 | interpret any of the provisions of this Agreement, the prevailing party 105 | shall be entitled to recover reasonable costs and attorneys’ fees at 106 | the arbitration, at trial, on appeal, and on any petition for review.

  30. 107 |
  31. Licensee acknowledges that breach of this Agreement would cause 108 | irreparable harm to iovation. Licensee therefore agrees to the entry of 109 | temporary, preliminary and permanent injunctions by any court of 110 | competent jurisdiction to prevent breach, or to compel performance, of 111 | this Agreement. This remedy is in addition to any other remedy 112 | available to iovation for breach of this Agreement.

  32. 113 |
  33. This Agreement shall be deemed to have been executed in, and shall be 114 | exclusively governed by and interpreted in accordance with the laws of 115 | the State of Oregon, U.S.A., including federal law, but excluding 116 | choice of law rules. Licensee consents to the jurisdiction of the state 117 | and federal courts of Oregon in connection with any claim arising out 118 | of or related to this Agreement.

  34. 119 |
120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /README.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | TransUnion FraudForce Android SDK Library 6 | 7 | 8 |

TRANSUNION TRUVALIDATE DEVICE RISK ANDROID SDK LIBRARY

9 |

What is TruValidate Device Risk?

10 |

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.

11 |

Overview

12 |

Follow these steps to implement the TruValidate Device Risk SDK for Android.

13 |

About Mobile Integration

14 |

TransUnion identifies devices through information collected by the Device Risk SDK run on an end-user’s mobile device. The Device Risk SDK inspects the device to generate a blackbox that contains all device information available. This blackbox must then be transmitted to your servers to be used in a risk check.

15 |

The Device Risk SDK integrates with native and hybrid apps. Hybrid apps mix native code with content that runs inside a web view.

16 |

Android Integration Files and Requirements

17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 |
SDK Filenamefraudforce-lib-release-5.2.2.aar
Version5.2.2
Packagecom.iovation.mobile.android.FraudForce
Android SDK DependenciesAndroid SDK 5.0 or higher (SDK level 21)
Library DependenciesNone
Required PermissionsNone
Optional PermissionsBLUETOOTH (up to Android 11), BLUETOOTH_CONNECT (starting on Android 12), CAMERA, ACCESS_WIFI_STATE,
READ_PHONE_STATE, ACCESS_FINE_LOCATION, ACCESS_BACKGROUND_LOCATION,
GET_ACCOUNTS, ACCESS_NETWORK_STATE
Supported NDK Architecturesx86, x86_64, arm64-v8a, armeabi-v7a
67 |
68 |

NOTE Android 12 introduced the BLUETOOTH_CONNECT permission, protected at the dangerous level. Refer to the official Android documentation on how to include it.

69 |

NOTE Regarding Android 11 background location changes: The Device Risk SDK neither requires nor requests location when the application is in a background state.

70 |

NOTE If the permissions listed are not required by the application, the values collected using those permissions will be ignored. The permissions are not required to obtain a usable blackbox, but they do help obtain some unique device information.

71 |

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.

72 |
73 |

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

74 |

Installing the Device Risk SDK for Android

75 |
    76 |
  1. Download iovation-android-sdk-5.2.2.zip from here: iovation Mobile SDK for Android.

    77 |
  2. 78 |
  3. Unzip iovation-android-sdk-5.2.2.zip.

    79 |
  4. 80 |
  5. Depending on your IDE, do one of the following:

    81 | 111 |
  6. 112 |
  7. If you are not already using Java 8 in your project, please include the following code into your application's 'build.gradle' file.

    113 |
     android {
    114 |      compileOptions {
    115 |          sourceCompatibility JavaVersion.VERSION_1_8
    116 |          targetCompatibility JavaVersion.VERSION_1_8
    117 |      }
    118 |  }
    119 | 
  8. 120 |
121 |

Integrating into Native Apps

122 |
123 |

NOTE If you are using an older version of the Android Gradle Plugin and encounter UnsatisfiedLinkErrors in the course of your testing, you may need to add the following to your ProGuard configuration:

124 |
```
125 | -keep public class com.iovation.mobile.android.details.RP {
126 |     public native java.lang.String a();
127 |     public native java.lang.String b();
128 | }
129 | ```
130 | 
131 |

To integrate into native apps:

132 |
    133 |
  1. In your Application class, import the FraudForceManager and FraudForceConfiguration objects.

    134 |

    Java

    135 |
     import com.iovation.mobile.android.FraudForceConfiguration;
    136 |  import com.iovation.mobile.android.FraudForceManager;
    137 | 

    Kotlin

    138 |
     import com.iovation.mobile.android.FraudForceConfiguration
    139 |  import com.iovation.mobile.android.FraudForceManager
    140 | 
  2. 141 |
142 |
    143 |
  1. Create a configuration object with your subscriber key, and enable or disable network calls to TransUnion servers. Entering the subscriber key is strongly recommended for all integrations, and it is required for network connections.

    144 |
    145 |

    NOTE Please review the Network Calls section of this document before enabling network calls.

    146 |

    IMPORTANT Please contact your TransUnion customer success team representative to receive your subscriber key.

    147 |
    148 |

    Java

    149 |
     FraudForceConfiguration configuration = new FraudForceConfiguration.Builder()
    150 |      .subscriberKey([YOUR-SUBSCRIBER-KEY-HERE])
    151 |      .enableNetworkCalls(true) // Defaults to false if left out of configuration
    152 |      .build();
    153 | 

    Kotlin

    154 |
     val configuration = FraudForceConfiguration.Builder()
    155 |          .subscriberKey([YOUR-SUBSCRIBER-KEY-HERE])
    156 |          .enableNetworkCalls(true)
    157 |          .build()
    158 | 
  2. 159 |
  3. Initialize the FraudForceManager class using the generated FraudForceConfiguration object, and the application context.

    160 |

    Java

    161 |
     FraudForceManager fraudForceManager = FraudForceManager.INSTANCE;
    162 |  fraudForceManager.initialize(configuration, context);
    163 | 

    Kotlin

    164 |
     FraudForceManager.initialize(configuration, applicationContext)
    165 | 
  4. 166 |
  5. Call the refresh() method in the same Activity/Fragment/ViewModel where getBlackbox() will be called. The integrating application only needs to call this method on the Fragments where the getBlackbox() method will be called.

    167 |
    168 |

    NOTE: This method calls updates the geolocation and network information, if enabled.

    169 |

    NOTE: As with initialization, pass the application context when refreshing.

    170 |
    171 |

    Java

    172 |
     FraudForceManager.INSTANCE.refresh(context);
    173 | 

    Kotlin

    174 |
     FraudForceManager.refresh(applicationContext)
    175 | 
  6. 176 |
  7. 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.

    177 |

    Java

    178 |
     String blackbox = FraudForceManager.INSTANCE.getBlackbox(context);
    179 | 

    Kotlin

    180 |
     val blackbox : String = FraudForceManager.getBlackbox(applicationContext)
    181 | 
  8. 182 |
  9. To generate the blackbox using a coroutine, declare the desired scope and call the getBlackbox(Context context) function on an instance of FraudForceManager. You can use the withContext(context: CoroutineContext) suspend function to utilize the blackbox data in another scope.

    183 |

    Kotlin Coroutines Example

    184 |
     private val uiScope = CoroutineScope(Dispatchers.IO)
    185 | 
    186 |  uiScope.launch {
    187 |      ...
    188 |      val blackbox : String = FraudForceManager.getBlackbox(applicationContext)
    189 |      withContext(Dispatchers.Main) {
    190 |          ...
    191 |          useBlackbox(blackbox)
    192 |      }
    193 |  }
    194 | 
  10. 195 |
196 |

Integrating into Hybrid Apps

197 |

Hybrid App Workflow Overview

198 |

Integrate into hybrid apps by implementing the following workflow for collecting and sending blackboxes:

199 |
    200 |
  1. An HTML page loads in a WebView.

    201 |
  2. 202 |
  3. The user submits a transaction on the HTML page by submitting a form or completing another action.

    203 |
  4. 204 |
  5. This calls the inject_bb function, which creates a hidden iframe that calls the iov:// URL. The iframe then deletes itself.

    205 |
  6. 206 |
  7. The shouldOverrideUrlLoading function inside of the WebView object in Java is called. This function detects the iov://blackbox/fill#dom_id URL.The dom_id is the ID of the object on the HTML page where the blackbox will be written, such as a hidden form field.

    207 |
  8. 208 |
  9. The shouldOverrideUrlLoading function runs JavaScript that automatically injects the blackbox into that object.

    209 |
  10. 210 |
211 |

Implementing Hybrid App Support

212 |
    213 |
  1. In your Application class, import the FraudForceManager and FraudForceConfiguration objects.

    214 |
     import com.iovation.mobile.android.FraudForceConfiguration;
    215 |  import com.iovation.mobile.android.FraudForceManager;
    216 | 
  2. 217 |
  3. Create a configuration object with your subscriber key, and enable or disable network calls to TransUnion servers. Entering the subscriber key is strongly recommended for all integrations, and it is required for network connections.

    218 |
    219 |

    NOTE Please review the Network Calls section of this document before enabling network calls.

    220 |
    221 |
     FraudForceConfiguration configuration = new FraudForceConfiguration.Builder()
    222 |      .subscriberKey([YOUR-SUBSCRIBER-KEY-HERE])
    223 |      .enableNetworkCalls(true) // Defaults to false if left out of configuration
    224 |      .build();
    225 | 
  4. 226 |
  5. Initialize the FraudForceManager class using the generated FraudForceConfiguration object, and the application context.

    227 |
     FraudForceManager fraudForceManager = FraudForceManager.INSTANCE;
    228 |  fraudForceManager.initialize(configuration, context);
    229 | 
  6. 230 |
  7. In your WebView Activity's onCreate() function, set your WebView's shouldOverrideUrlLoading() function, as well as the onPageStarted() function.

    231 |
    wv.setWebViewClient(new WebViewClient() {
    232 |     @Override
    233 |     public void onPageStarted(WebView view, String url, Bitmap favicon) {
    234 |         FraudForceManager.INSTANCE.refresh(getContext());
    235 |         super.onPageStarted(view, url, favicon);
    236 |     }
    237 | 
    238 |     @Override
    239 |     public boolean shouldOverrideUrlLoading(WebView view, String url) {
    240 |         String[] ref = url.split("#");
    241 |         if (url.startsWith("iov://") && ref.length > 1 && ref[1] != null) {
    242 |         String injectedJavascript="javascript:(function() { " +
    243 |             "document.getElementById('" + ref[1] + "').value = '"
    244 |             + FraudForceManager.INSTANCE.getBlackbox(wv.getContext())
    245 |             + "';})()";
    246 |             wv.loadUrl(injectedJavascript);
    247 |             return true;
    248 |         }
    249 |         return false;
    250 |     }
    251 | });
    252 | 
  8. 253 |
  9. On your HTML page, include a javascript function called inject_bb that injects an iframe with a call to the iov:// URL.

    254 |
    function inject_bb(id) {
    255 |     var iframe = document.createElement('IFRAME');
    256 |     iframe.setAttribute('src', 'iov://blackbox/fill#' + id);
    257 |     iframe.name="ioOut";
    258 |     document.documentElement.appendChild(iframe);
    259 |     iframe.parentNode.removeChild(iframe);
    260 |     iframe = null;
    261 | }
    262 | 
  10. 263 |
  11. You must inject the blackbox into a DOM object for collection. To do this, call the inject_bb function with the ID of the DOM object, which will automatically call the shouldOverrideUrlLoading() function. For example, set ID to a hidden form field where the blackbox will be stored. When the form containing the field is submitted, the blackbox is returned to your server back-end, and can then be sent to TransUnion to evaluate along with the transaction.

    264 |
  12. 265 |
266 |

Network Calls

267 |

The SDK includes the ability to make a network call to TransUnion TruValidate's service. This enables additional functionality in the Device Risk SDK, including:

268 | 275 |

Compiling The Sample App in Android Studio

276 |

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

277 |
    278 |
  1. From the directory where you unzipped fraudforce-lib-release-5.2.2.zip or cloned the repo, open the android-studio-sample-app directory.

    279 |
  2. 280 |
  3. In the project navigation view, open app/src/main/java/com/iovation/mobile/android/sample/MainActivity.java to run the Java sample app. To run the Kotlin sample app, open kotlinApp/src/main/java/com/iovation/mobile/android/sample/MainActivity.kt.

    281 |
  4. 282 |
  5. Right-click the file editing view and select Run Main Activity.

    283 | 288 |
  6. 289 |
  7. Select either an attached physical device, or an Android virtual device to run the app on. The app should now compile and launch.

    290 |
  8. 291 |
  9. When the app compiles successfully, you will see a view with a button that allows you to display a blackbox.

    292 |
  10. 293 |
294 |

Changelog

295 |

5.2.2

296 | 299 |

5.2.1

300 | 305 |

5.1.0

306 | 309 |

5.0.0

310 | 324 |

4.3.2

325 | 328 |

4.3.1

329 | 335 |

4.3.0

336 | 341 |

4.2.0

342 | 348 |

4.1.1

349 | 355 |

4.1.0

356 | 359 |

4.0.0

360 | 368 |

3.1.0

369 | 377 |

3.0.1

378 | 384 |

3.0.0

385 | 395 |

2.3.3

396 | 399 |

2.3.2

400 | 403 |

2.3.1

404 | 414 |

2.3.0

415 | 425 |

2.2.0

426 | 429 |

2.1.0

430 | 433 |

2.0.1

434 | 437 |

2.0.0

438 | 446 | 447 | 448 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TRANSUNION TRUVALIDATE DEVICE RISK ANDROID SDK LIBRARY 2 | 3 | ## What is TruValidate Device Risk? 4 | **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.** 5 | 6 | ## Overview 7 | 8 | Follow these steps to implement the TruValidate Device Risk SDK for Android. 9 | 10 | ## About Mobile Integration 11 | 12 | TransUnion identifies devices through information collected by the Device Risk SDK run on an end-user’s mobile device. The Device Risk SDK inspects the device to generate a blackbox that contains all device information available. This blackbox must then be transmitted to your servers to be used in a risk check. 13 | 14 | The Device Risk SDK integrates with native and hybrid apps. Hybrid apps mix native code with content that runs inside a web view. 15 | 16 | ## Android Integration Files and Requirements 17 | 18 | 19 | | | | 20 | |---------------------------------|--------------------------------------------------------------------------------------------------------| 21 | | **SDK Filename** | fraudforce-lib-release-5.2.2.aar | 22 | | **Version** | 5.2.2 | 23 | | **Package** | com.iovation.mobile.android.FraudForce | 24 | | **Android SDK Dependencies** | Android SDK 5.0 or higher (SDK level 21) | 25 | | **Library Dependencies** | None | 26 | | **Required Permissions** | None | 27 | | **Optional Permissions** | BLUETOOTH (up to Android 11), BLUETOOTH_CONNECT (starting on Android 12), CAMERA, ACCESS\_WIFI\_STATE, | 28 | | | READ\_PHONE\_STATE, ACCESS\_FINE\_LOCATION, ACCESS\_BACKGROUND\_LOCATION, | 29 | | | GET\_ACCOUNTS, ACCESS\_NETWORK\_STATE | 30 | | **Supported NDK Architectures** | x86, x86_64, arm64-v8a, armeabi-v7a | 31 | 32 | > __NOTE__ Android 12 introduced the BLUETOOTH_CONNECT permission, protected at the dangerous level. Refer to the [official Android documentation](https://developer.android.com/about/versions/12/features/bluetooth-permissions) on how to include it. 33 | 34 | > __NOTE__ Regarding Android 11 background location changes: The Device Risk SDK neither requires nor requests location when the application is in a background state. 35 | 36 | > __NOTE__ If the permissions listed are not required by the application, the values collected using those permissions will be ignored. The permissions are not required to obtain a usable blackbox, but they do help obtain some unique device information. 37 | 38 | > __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. 39 | 40 | Version 5.2.2 of the TruValidate Device Risk SDK for Android supports Android 5.0 or higher. 41 | 42 | ## Installing the Device Risk SDK for Android 43 | 44 | 1. Download iovation-android-sdk-5.2.2.zip from here: [iovation Mobile SDK for Android](https://github.com/iovation/deviceprint-SDK-Android).  45 | 46 | 2. Unzip iovation-android-sdk-5.2.2.zip. 47 | 48 | 3. Depending on your IDE, do one of the following: 49 | 50 | - 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). 51 | 52 | - If you are using __Gradle__, add the *fraudforce-lib-release-5.2.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-5.2.2.aar file accessible to Gradle. 53 | 54 | ``` 55 | buildscript { 56 | repositories { 57 | flatDir { 58 | dirs 'libs' 59 | } 60 | } 61 | } 62 | 63 | repositories { 64 | flatDir { 65 | dirs 'libs' 66 | } 67 | } 68 | ``` 69 | Also in the application module's `build.gradle` file, make sure that fraudforce-lib-release-5.2.2 is included as a dependency: 70 | 71 | ``` 72 | dependencies { 73 | ... 74 | implementation(name:'fraudforce-lib-release-5.2.2', ext:'aar') 75 | } 76 | ``` 77 | 78 | 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: 79 | 80 | ``` 81 | dependencies { 82 | ... 83 | implementation files('libs/fraudforce-lib-release-5.2.2.aar') 84 | } 85 | ``` 86 | 87 | Save the `build.gradle` file. 88 | 89 | 4. If you are not already using Java 8 in your project, please include the following code into your application's 'build.gradle' file. 90 | ``` 91 | android { 92 | compileOptions { 93 | sourceCompatibility JavaVersion.VERSION_1_8 94 | targetCompatibility JavaVersion.VERSION_1_8 95 | } 96 | } 97 | ``` 98 | 99 | ## Integrating into Native Apps 100 | 101 | > __NOTE__ If you are using an older version of the Android Gradle Plugin and encounter UnsatisfiedLinkErrors in the course of your testing, you may need to add the following to your ProGuard configuration: 102 | ``` 103 | -keep public class com.iovation.mobile.android.details.RP { 104 | public native java.lang.String a(); 105 | public native java.lang.String b(); 106 | } 107 | ``` 108 | 109 | To integrate into native apps: 110 | 111 | 1. In your Application class, import the `FraudForceManager` and `FraudForceConfiguration` objects. 112 | 113 | Java 114 | ``` 115 | import com.iovation.mobile.android.FraudForceConfiguration; 116 | import com.iovation.mobile.android.FraudForceManager; 117 | ``` 118 | Kotlin 119 | ``` 120 | import com.iovation.mobile.android.FraudForceConfiguration 121 | import com.iovation.mobile.android.FraudForceManager 122 | ``` 123 | 124 | 125 | 2. Create a configuration object with your subscriber key, and enable or disable network calls to TransUnion servers. Entering the subscriber key is strongly recommended for all integrations, and it is required for network connections. 126 | 127 | > __NOTE__ Please review the Network Calls section of this document before enabling network calls. 128 | 129 | > __IMPORTANT__ Please contact your TransUnion customer success team representative to receive your subscriber key. 130 | 131 | Java 132 | ``` 133 | FraudForceConfiguration configuration = new FraudForceConfiguration.Builder() 134 | .subscriberKey([YOUR-SUBSCRIBER-KEY-HERE]) 135 | .enableNetworkCalls(true) // Defaults to false if left out of configuration 136 | .build(); 137 | ``` 138 | Kotlin 139 | ``` 140 | val configuration = FraudForceConfiguration.Builder() 141 | .subscriberKey([YOUR-SUBSCRIBER-KEY-HERE]) 142 | .enableNetworkCalls(true) 143 | .build() 144 | ``` 145 | 146 | 3. Initialize the FraudForceManager class using the generated FraudForceConfiguration object, and the application context. 147 | 148 | Java 149 | ``` 150 | FraudForceManager fraudForceManager = FraudForceManager.INSTANCE; 151 | fraudForceManager.initialize(configuration, context); 152 | ``` 153 | Kotlin 154 | ``` 155 | FraudForceManager.initialize(configuration, applicationContext) 156 | ``` 157 | 158 | 4. Call the `refresh()` method in the same Activity/Fragment/ViewModel where `getBlackbox()` will be called. The integrating application only needs to call this method on the Fragments where the `getBlackbox()` method will be called. 159 | 160 | > __NOTE__: This method calls updates the geolocation and network information, if enabled. 161 | 162 | > __NOTE__: As with initialization, pass the application context when refreshing. 163 | 164 | Java 165 | ``` 166 | FraudForceManager.INSTANCE.refresh(context); 167 | ``` 168 | Kotlin 169 | ``` 170 | FraudForceManager.refresh(applicationContext) 171 | ``` 172 | 173 | 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. 174 | 175 | Java 176 | ``` 177 | String blackbox = FraudForceManager.INSTANCE.getBlackbox(context); 178 | ``` 179 | Kotlin 180 | ``` 181 | val blackbox : String = FraudForceManager.getBlackbox(applicationContext) 182 | ``` 183 | 6. To generate the blackbox using a coroutine, declare the desired scope and call the getBlackbox(Context context) function on an instance of FraudForceManager. You can use the withContext(context: CoroutineContext) suspend function to utilize the blackbox data in another scope. 184 | 185 | Kotlin Coroutines Example 186 | ``` 187 | private val uiScope = CoroutineScope(Dispatchers.IO) 188 | 189 | uiScope.launch { 190 | ... 191 | val blackbox : String = FraudForceManager.getBlackbox(applicationContext) 192 | withContext(Dispatchers.Main) { 193 | ... 194 | useBlackbox(blackbox) 195 | } 196 | } 197 | ``` 198 | 199 | ## Integrating into Hybrid Apps 200 | 201 | ### Hybrid App Workflow Overview 202 | 203 | Integrate into hybrid apps by implementing the following workflow for collecting and sending blackboxes: 204 | 205 | 1. An HTML page loads in a WebView. 206 | 207 | 2. The user submits a transaction on the HTML page by submitting a form or completing another action.  208 | 209 | 3. This calls the `inject_bb` function, which creates a hidden iframe that calls the `iov://` URL. The iframe then deletes itself. 210 | 211 | 4. The `shouldOverrideUrlLoading` function inside of the WebView object in Java is called. This function detects the `iov://blackbox/fill#dom_id` URL.The `dom_id` is the ID of the object on the HTML page where the blackbox will be written, such as a hidden form field. 212 | 213 | 5. The `shouldOverrideUrlLoading` function runs JavaScript that automatically injects the blackbox into that object. 214 | 215 | ### Implementing Hybrid App Support 216 | 217 | 1. In your Application class, import the `FraudForceManager` and `FraudForceConfiguration` objects. 218 | 219 | ``` 220 | import com.iovation.mobile.android.FraudForceConfiguration; 221 | import com.iovation.mobile.android.FraudForceManager; 222 | ``` 223 | 224 | 2. Create a configuration object with your subscriber key, and enable or disable network calls to TransUnion servers. Entering the subscriber key is strongly recommended for all integrations, and it is required for network connections. 225 | 226 | > __NOTE__ Please review the Network Calls section of this document before enabling network calls. 227 | 228 | ``` 229 | FraudForceConfiguration configuration = new FraudForceConfiguration.Builder() 230 | .subscriberKey([YOUR-SUBSCRIBER-KEY-HERE]) 231 | .enableNetworkCalls(true) // Defaults to false if left out of configuration 232 | .build(); 233 | ``` 234 | 235 | 3. Initialize the FraudForceManager class using the generated FraudForceConfiguration object, and the application context. 236 | 237 | ``` 238 | FraudForceManager fraudForceManager = FraudForceManager.INSTANCE; 239 | fraudForceManager.initialize(configuration, context); 240 | ``` 241 | 242 | 4. In your WebView Activity's `onCreate()` function, set your WebView's `shouldOverrideUrlLoading()` function, as well as the `onPageStarted()` function. 243 | 244 | ``` 245 | wv.setWebViewClient(new WebViewClient() { 246 | @Override 247 | public void onPageStarted(WebView view, String url, Bitmap favicon) { 248 | FraudForceManager.INSTANCE.refresh(getContext()); 249 | super.onPageStarted(view, url, favicon); 250 | } 251 | 252 | @Override 253 | public boolean shouldOverrideUrlLoading(WebView view, String url) { 254 | String[] ref = url.split("#"); 255 | if (url.startsWith("iov://") && ref.length > 1 && ref[1] != null) { 256 | String injectedJavascript="javascript:(function() { " + 257 | "document.getElementById('" + ref[1] + "').value = '" 258 | + FraudForceManager.INSTANCE.getBlackbox(wv.getContext()) 259 | + "';})()"; 260 | wv.loadUrl(injectedJavascript); 261 | return true; 262 | } 263 | return false; 264 | } 265 | }); 266 | ``` 267 | 268 | 5. On your HTML page, include a javascript function called `inject_bb` that injects an iframe with a call to the `iov://` URL. 269 | 270 | function inject_bb(id) { 271 | var iframe = document.createElement('IFRAME'); 272 | iframe.setAttribute('src', 'iov://blackbox/fill#' + id); 273 | iframe.name="ioOut"; 274 | document.documentElement.appendChild(iframe); 275 | iframe.parentNode.removeChild(iframe); 276 | iframe = null; 277 | } 278 | 279 | 6. You must inject the blackbox into a DOM object for collection. To do this, call the `inject_bb` function with the ID of the DOM object, which will automatically call the `shouldOverrideUrlLoading()` function. For example, set `ID` to a hidden form field where the blackbox will be stored. When the form containing the field is submitted, the blackbox is returned to your server back-end, and can then be sent to TransUnion to evaluate along with the transaction. 280 | 281 | ## Network Calls 282 | 283 | The SDK includes the ability to make a network call to TransUnion TruValidate's service. This enables additional functionality in the Device Risk SDK, including: 284 | 285 | - Collect additional network information 286 | - Configuration updates to root detection 287 | - Collect information on potential high-risk applications on the device 288 | 289 | By default this functionality is disabled and will need to be enabled in the configuration object. Usage of this feature requires a subscriber key be provided. Please contact your TransUnion client representative to acquire a subscriber key. 290 | 291 | ## Compiling The Sample App in Android Studio 292 | 293 | 1 In Android Studio, select File | Open or click **Open Existing Android Studio Project** from the quick-start screen. 294 | 295 | 2. From the directory where you unzipped fraudforce-lib-release-5.2.2.zip or cloned the repo, open the **android-studio-sample-app** directory. 296 | 297 | 3. In the project navigation view, open `app/src/main/java/com/iovation/mobile/android/sample/MainActivity.java` to run the Java sample app. To run the Kotlin sample app, open `kotlinApp/src/main/java/com/iovation/mobile/android/sample/MainActivity.kt`. 298 | 299 | 4. Right-click the file editing view and select _Run Main Activity_. 300 | 301 | - **IMPORTANT!** If the option to run the module does not appear, select FILE -> PROJECT STRUCTURE and open the Modules panel. From there, set the Module SDK drop-down to your target Android SDK version. 302 | 303 | Alternatively, you can right-click on the build.gradle file, and select **Run 'build'**. 304 | 305 | 5. Select either an attached physical device, or an Android virtual device to run the app on. The app should now compile and launch. 306 | 307 | 6. When the app compiles successfully, you will see a view with a button that allows you to display a blackbox. 308 | 309 | ## Changelog 310 | ### 5.2.2 311 | - Bug fix to handle abstract method exception. 312 | 313 | ### 5.2.1 314 | - Update target SDK to 33. 315 | - Adjusted collection details. 316 | - Bug fix for collection issue. 317 | 318 | ### 5.1.0 319 | - Adjusted collection details. 320 | 321 | ### 5.0.0 322 | - **Java 8 is now required.** 323 | - **The SDK has migrated to Kotlin (1.5.30).** 324 | - If your application does not already include the Kotlin standard library (i.e. your application 325 | - is written entirely in Java), then you must include the kotlin stdlib as a dependency. 326 | - **FraudForceManager can be accessed as a Kotlin object or via FraudForceManager.INSTANCE when using Java).** 327 | - Targeting Android 12 (API 31). 328 | - Changes to cryptography uses. 329 | - Adjusted collection details. 330 | - Improvements to detail caching. 331 | - Fixed Proguard rules. 332 | 333 | ### 4.3.2 334 | - Adjusted root detection. 335 | 336 | ### 4.3.1 337 | - Update target and compilation SDK versions to 31. 338 | - Adjusted collection details. 339 | - Compatible with the new bluetooth changes/permissions in Android 12. 340 | - Fixed crashes on devices running below SDK version 24. 341 | 342 | ### 4.3.0 343 | 344 | - Minimum supported Android version updated, from 16 to 21. 345 | - Update target and compilation SDK versions to 30. 346 | - Bug fixes for NPEs sometimes encountered during asynchronous calls to initialize and/or refresh. 347 | 348 | ### 4.2.0 349 | 350 | - Several obfuscation-related updates/fixes, including preservation of base package. 351 | 352 | - Update target SDK to 29 353 | 354 | ### 4.1.1 355 | - Updated compileSdkVersion to 29. 356 | 357 | - Behavioral changes for apps targeting API 29. 358 | 359 | ### 4.1.0 360 | 361 | - Adjusted recognition details. 362 | 363 | ### 4.0.0 364 | 365 | - Enhanced support for Android 9.0 Pie. 366 | 367 | - Further improvements to location data collection process. 368 | 369 | - Resolved Google Play alerts regarding encryption methods. 370 | 371 | ### 3.1.0 372 | 373 | - Support for Android 9.0 Pie. 374 | 375 | - Fix for issue related to the Turkish character set. 376 | 377 | - Improved location data collection process. 378 | 379 | ### 3.0.1 380 | 381 | - Improved blackbox data collection performance. 382 | 383 | - More efficient network calls to iovation. 384 | 385 | ### 3.0.0 386 | 387 | - New API objects, `FraudForceConfiguration` and `FraudForceManager`. Prior API objects have been removed. 388 | 389 | - Compatibility with Android 8.0. 390 | 391 | - Introduced network calls back to iovation service for additional functionality. 392 | 393 | - Dropped support for Android API level 8 through API level 15. 394 | 395 | ### 2.3.3 396 | 397 | - Compatibility with Android 7.0. 398 | 399 | ### 2.3.2 400 | 401 | - Improved error handling. 402 | 403 | ### 2.3.1 404 | 405 | - Improved permission checking. 406 | 407 | - Fixes crash with invalid locale. 408 | 409 | - Fixes error with Bluetooth permission. 410 | 411 | - More robust error handling. 412 | 413 | ### 2.3.0 414 | 415 | - Compatibility with Android 6.0 permission system. 416 | 417 | - Enhanced recognition with additional details added in Android 6.0. 418 | 419 | - Enhanced geolocation services with mock location detection capabilities. 420 | 421 | - Enhanced carrier detection and home carrier detection. 422 | 423 | ### 2.2.0 424 | 425 | - Compatibility with older versions of Android build-tools. 426 | 427 | ### 2.1.0 428 | 429 | - Enhanced recognition with the collection of additional details. 430 | 431 | ### 2.0.1 432 | 433 | - Fix bug with permissions that would crash applications. 434 | 435 | ### 2.0.0 436 | 437 | - New API method, `getBlackbox`, handles low-priority asynchronous collection of device data. The `ioBegin` method remains for backwards compatibility. 438 | 439 | - Expanded the android-studio-sample-app with a WebView integration example. 440 | 441 | - Added WebView integration instructions. 442 | -------------------------------------------------------------------------------- /android-studio-sample-app/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 31 5 | 6 | defaultConfig { 7 | applicationId "com.iovation.mobile.android.sample.sampleapp" 8 | minSdkVersion 21 9 | targetSdkVersion 33 10 | versionCode 14 11 | versionName "5.2.2" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | lintOptions { 20 | abortOnError false 21 | } 22 | compileOptions { 23 | sourceCompatibility JavaVersion.VERSION_1_8 24 | targetCompatibility JavaVersion.VERSION_1_8 25 | } 26 | } 27 | 28 | dependencies { 29 | implementation fileTree(dir: 'libs', include: ['*.jar']) 30 | implementation files('libs/fraudforce-lib-release-5.2.2.aar') 31 | implementation "org.jetbrains.kotlin:kotlin-stdlib:1.5.30" 32 | } 33 | -------------------------------------------------------------------------------- /android-studio-sample-app/app/libs/fraudforce-lib-release-5.2.2.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iovation/deviceprint-SDK-Android/8ca35e917006ee3d5f5dbee53de3d7a405d59382/android-studio-sample-app/app/libs/fraudforce-lib-release-5.2.2.aar -------------------------------------------------------------------------------- /android-studio-sample-app/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/trevorchapman/CodingLibs/android-sdk-macosx/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /android-studio-sample-app/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 22 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /android-studio-sample-app/app/src/main/assets/JsInjectionIntegration.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | My HTML 6 | 7 | 8 |

MyHTML

9 |
10 | 11 |
12 |
13 | 14 | 15 |
16 | 17 |
18 | 19 | 20 | 21 | 37 | 38 | 39 |