You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
119
126
120
127
> __NOTE__ Please review the Network Calls section of this document before enabling network calls.
121
128
122
129
> __IMPORTANT__ Please contact your TransUnion customer success team representative to receive your subscriber key.
123
-
130
+
131
+
Java
124
132
```
125
133
FraudForceConfiguration configuration = new FraudForceConfiguration.Builder()
126
134
.subscriberKey([YOUR-SUBSCRIBER-KEY-HERE])
127
135
.enableNetworkCalls(true) // Defaults to false if left out of configuration
128
136
.build();
129
137
```
138
+
Kotlin
139
+
```
140
+
val configuration = FraudForceConfiguration.Builder()
141
+
.subscriberKey([YOUR-SUBSCRIBER-KEY-HERE])
142
+
.enableNetworkCalls(true)
143
+
.build()
144
+
```
130
145
131
146
3. Initialize the FraudForceManager class using the generated FraudForceConfiguration object, and the application context.
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.
139
159
140
160
> __NOTE__: This method calls updates the geolocation and network information, if enabled.
141
161
142
162
> __NOTE__: As with initialization, pass the application context when refreshing.
143
-
163
+
164
+
Java
144
165
```
145
166
FraudForceManager.INSTANCE.refresh(context);
146
167
```
168
+
Kotlin
169
+
```
170
+
FraudForceManager.refresh(applicationContext)
171
+
```
147
172
148
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.
val blackbox : String = FraudForceManager.getBlackbox(applicationContext)
182
+
```
153
183
154
184
## Integrating into Hybrid Apps
155
185
@@ -249,7 +279,7 @@ The SDK includes the ability to make a network call to TransUnion TruValidate's
249
279
250
280
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.
251
281
252
-
3. In the project navigation view, open `src/main/java/com/iovation/mobile/android/sample/MainActivity.java`
282
+
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`.
253
283
254
284
4. Right-click the file editing view and select _Run Main Activity_.
0 commit comments