I am about to automaticaly scan my device for malware files. I use MonkeyRunner to connect, start the Antimalware Software, and start the scan. Here some of the code I use:
device.startActivity(component=runComponent)
MonkeyRunner.sleep(2)
device.touch(250, 750, 'DOWN_AND_UP')
MonkeyRunner.sleep(1)
device.press('KEYCODE_MENU', MonkeyDevice.DOWN_AND_UP)
MonkeyRunner.sleep(1)
device.touch(350, 750, 'DOWN_AND_UP')
pressing the appropriate buttons till the scan starts..
Now I need to sleep the script somehow.. untill the scan complete, to continue with some other actions. Since we dont know for how long will the AV scan, we can't use the sleep function with a specific number...
I was thinkin to do something with the app Activities but dont know what :/
Any ideas would be very usefull
Best regards Giannis