collectAsync

fun collectAsync(callback: (String) -> Unit, timeout: Long = 15000)

Asynchronous method used to collect profiling information and callback function to process the profiling data
Note: collect() wouldn't wait for some biometrics data, e.g. key inputs and touch movements data
if you want collect enough data on key inputs, touch movements and wait for permission gave by the user
It's better to call collect() after enough time for the permissions and human interactions

Parameters

callback

: (String) -> Unit(Void in Kotlin)

timeInMillis

: Uint32, default 15000(15 seconds), once timeout, callback triggered regardless if profiling is done

Example

func dwnApiCall(_ fp: String) {
print("Got FP String: \(fp)")
}

let sdk = DwnProfilingSDK(config)
sdk.start(config)
val callback : (String) -> Unit = { fp: String -> dwnApiCall(fp) }
sdk.collectAsync(callback)