runOnEmulator

suspend fun runOnEmulator(owner: AppCompatActivity, callback: () -> Unit)

Detect if the application is running on an emulator.

Parameters

owner

a supervised activity

callback

is returned if the application is running on an emulator.


🔑 Minimum required license level: Advanced.


Sample usage

val runtimeCheckModel = rasp.watcher.runtimeCheck.observe()
runtimeCheckModel.runOnEmulator(requireActivity()) {
Log.d("RASP-DEMO", "Emulator detected")
}