简体   繁体   中英

Android, how to get information on which activity is currently showing (in foregorund)?

I wonder if there is a way to get information on which activity currently has focus (is in the foreground)? I am using instrumentation and I would like to know which activity is currently running in the application that I am testing against.

Thanks

Take a look at Robotium
'a open-source test framework created to make automatic black-box testing of Android applications significantly faster and easier than what is possible with Android instrumentation tests out-of-the-box.'

Homepage: http://www.robotium.org/
Source: http://github.com/jayway/robotium

Please note that the Robotium project is maintained by the company I work for

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM