Android timer how to?
<p>I have a basic timer here that I'd like to call a method in every 2 seconds or so..</p>

<p>I'm trying to implement my timer but it gives me a "Unable to start activity ComponentInfo" error.</p>

<p>Here is my code:</p>

<pre><code>public class AndroidTabLayoutActivity extends TabActivity {

Timer pollTimer;
TimerTask TestTimer;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    pollTimer = new Timer();

    pollTimer.scheduleAtFixedRate(TestTimer, 1, 1000);

    TestTimer = new TimerTask() {
        @Override
        public void run() {
            System.out.println("Timer tick!");
        }
    };
}
</code></pre>

<p>There must be something I'm doing wrong.</p>

<p>Any help would be fantastic, thank you!</p>
