1. Download our Official Android App: Forums for Android!

Running TestCase in Thread

Discussion in 'Android Apps & Games' started by asrekik, Oct 6, 2010.

  1. asrekik

    asrekik Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    2
    Joined:
    Oct 6, 2010

    Oct 6, 2010
    2
    0
    5
    Hi,
    How have a TestCase that calls an asynchronous functions. the callback of this function is called by a thread, so we can't the assert test is made in the thread, not in the testcase thread.
    So how we can run the callback function in the testcase thread?
    I found the same problem when this callback liked to change the UI, so the solution that i find is to run the code in the runOnUiThread.
     

    Advertisement

Share This Page

Loading...