Android每隔X秒运行一次任务

时间:2022-09-04 01:07:26

I have to get records from an MSSQL DB every 10 seconds and refresh my Layout. How can I achieve this?

我必须每隔10秒从MSSQL DB获取记录并刷新我的布局。我怎样才能做到这一点?

When I run it in a new thread, I am not allowed to change the View.

当我在新线程中运行它时,我不允许更改视图。

1 个解决方案

#1


1  

TimerTask should do what you want

TimerTask应该做你想要的

#1


1  

TimerTask should do what you want

TimerTask应该做你想要的