Thursday, May 27, 2010

[android-developers] Easy way to find out the current activity in unit tests?

Hi,

I want to test an activity that might be already finished() and the control flow has moved on to another activity. Hence in a test I would like to make sure first that I am still on the activity that I want to test. 

Is there any way to find out what the current activity displayed is or if my activity is currently displayed?

I know that I could work around it with overloading onResume/onPause to track the activities state explicitly, but I was wondering if there is an easier way to do it.

Cheers,

Mariano

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment