We could use adb for that.
I think something like this would work:
adb shell dumpsys window windows | grep -E 'mFocusedApp'
(Grep would have to be done in a Windows friendly way)
I guess this could also be used to check if the expected external app is started when you expect that - haven't really though it through :)
- Jonas