start

fun start(config: <Error class: unknown class><String, Any>? = null, activity: Activity? = null)

Starts profiling.
You can call start() in activity onCreate() and pass the activity as parameter

class MyActivity : AppCompatActivity() {

// Darwinium support multiple sdk instances,
// it's better to declare each instance inside each activity
private var sdk: DwnProfilingSDK? = null

override fun onCreate(savedInstanceState: Bundle?) {
val config = hashMapOf(
"profiling_debug" to true
)

// activity(this) is important for sdk profiling, it has to pass either in constructor or start()
sdk = DwnProfilingSDK()
sdk?.start(config, this)
...
}

// stop SDK when activity destroyed
override fun onDestroy() {
sdk?.stop()
}
...
}

Parameters

config

optional - a set of configuration parameters. Note that this same map can be provided in the start method, which may be useful in particular if permissions require processing or it is unclear what is needed at class creation time. Config Parameters:

activity

optional, Activity - An activity that you wish to bind to - typically you would use this and instigate within your current view
activity is essential for profiling, if there is no activity passed in sdk constructor, you HAVE TO pass it here

profiling_debugBooleantrueIndicates whether to include additional diagnostic metadata with the profiling event.
Useful for troubleshooting and analyzing events with missing or incomplete data.
NOTE: This does not enable console logging
true
biometricsBooleantrueDenotes whether to capture any biometric capabilities - eg from touch gestures or device sensors such as accelerometers.
Note that these can be controlled individually through touch and sensor config options
true
touchBooleantrueDenotes whether to capture touch biometrics gesture metadata. This is useful for determining robotic behavior anomalies within your apptrue
sensorBooleantrueDenotes whether to capture profiling information from sensors such as the device's accelerometer, light sensor, and gyroscope.
Values that have low deviation typically suggest that the device is either being emulated or part of a device farm
true
log_levelstringwarnsets the debug log level. This is useful for internally debugging your applicationinfo, debug, warn, error, verbose, disable
dns_domainstringthis is a domain used to determine what DNS server is being used by the device's primary network interface.
It should be left as the default value in most circumstances
ats.example.com
https_profiling_domainstringdomain used to profile the devices HTTPS connection behavior to determine fingerprints.
It should be left as the default in most instances
webrtc_tcp_serverstringdomain used to initial turn tcp connection behavior to determine fingerprints.
It should be left as the default in most instances
webrtc_udp_serverstringdomain used to initial turn udp connection behavior to determine fingerprints.
It should be left as the default in most instances
MaxSensorCountInt100The maximum number of sensor samples to profile
MaxSwipesInt10The maximum number of swipes to count prior to profiling finishing
malware_scanBooleanfalseenable/disable malware scanning, default is disabled
max_fp_sizeInt8192Max size (base64 length) of the profiling blob. When exceeded, lower-priority fields are dropped to fit.8192