I got timerTask which calls every 500ms. Every time it calls it freeze my ui thread for a moment. My question is how to make it runs in not UI thread?
mTimer.schedule(keeper, 0, 500);
private class PlayerKeeper extends TimerTask {
@Override
public void run() {
new Thread(new Runnable() {
@Override
public void run() {}
});