How to switch window on android device?

When I attach a dual-screen on an Android device, there will be two different windows on the current interface. I can set enableMultiWindows setting to true to get all active windows. But now I want to switch window to get some actions. Such as take screen or get the element and so on. What can I do about these?

Could someone help me?

I did not see anything in UiAutomator framework for dual screen devices support. Please report an improvement request to Google

Thanks for the answer, Could use espresso to support it?

I don’t know, never tried it. But other people probably did:

:+1:thanks,I will try it.