stop

fun stop()

Stops profiling.
You can call stop() in activity onDestroy()

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": true
)
// activity(this) is important for sdk profiling, it has to pass either in constructor or start()
sdk = DwnProfilingSDK()
sdk.start(config, this)
...
}

override fun onDestroy(savedInstanceState: Bundle?) {
sdk.stop()
...
}
...
}

When you using the sdk instance across multiple activities, it's better to start()/stop() when activity onCreate/onDestroy