I use AndroidViewClient
in order to use MonkeyRunner
through Python
. I need to start the AVD
programmatically and get notified when the AVD
start process is completed. How can I catch that event? The execution just does not reach the line after the subprocess.run()
function.
Here is how I start my AVD
:
subprocess.run('emulator -avd Nexus_5_API_26 -wipe-data', shell=True)
// the execution just does not reach this line
You can detect that the AVD is ready using
adb wait-for-device
also, to start the emulator in the background you need Popen.