I have been tinkering around with adb and attempting to control an application and close popup windows using adb shell commands. I trying to close an activity window that I can identify with the following command:
adb shell "dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp"
which returns two different variables while the window I want to close is open:
mCurrentFocus=Window{
4e8ee3f u0 myApp/myActivity
}
(this is what I want to close)
mFocusedApp=AppWindowToken{
ee23799 token=Token{
5208e0 ActivityRecord{
4dac6e3 u0 myApp/myActity
}
}
}
Is it possible to close the current focus window and if so how?