2016-04-30 55 views
-2

我寫了兩個方法A & B.方法A有一個倒數計時器,它在4分鐘內記錄輸入。 我想方法B在方法A運行超過4分鐘後執行。執行一個方法取決於在android中執行另一個方法

什麼是使這成爲可能的方法。

我試過使用Asynctask無濟於事。

幫助表示讚賞

+0

...嘗試使用CountDownTimer。 –

+0

我已經在使用它... –

+0

然後你用錯了它。 –

回答

0

在的AsyncTask你開始新的進程時,舊進程完成..

在方法A

protected void onPostExecute(Boolean result) { 

    task.execute("your url");// start new Asynctask of Process B 
    } 
相關問題