I guess it wasn't a well-known question, after all....

Today I tried a really simple minded approach of putting a function in
my activity to return if the Cursor was set or not, which happens when
the onQueryComplete() callback is finished.

Then I had the test looping on calling that and it never gets set. I'm
not surprised.

I suspect there are examples in the source code, but it appears that a
Windows user can't get hold of that either.

Isn't there someone out there who has successfully tested an Actvity
that uses AsyncQueryHandler? How can you tell, programatically from
within a test procedure, when the onQueryComplete() has been called?

On Dec 2, 4:26 pm, Brion Emde <[email protected]> wrote:
> Apologies if this is a widely asked question. I did take a look.
>
> I'm using a web service disguised as a ContentProvider and
> AsyncQueryHandler to isolate my activity from the delays of transport.
>
> My question is: during testing, how can I determine when my activity
> has retrieved the data from the web service? That would be after
> onQueryComplete() in the AsyncQueryHandler has come back with the
> "real" data.
>
> During manual testing, I just sit there and wait until the view
> updates. How can I do that using ActivityUnitTestCase and
> ActivityInstrumentationTestCase2?
>
> Thanks

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

Reply via email to